Re: [PATCH 01/11] path: harden validation of HEAD with non-standard hashes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Patrick Steinhardt <ps@xxxxxx> writes:

>> All makes sense, and given the above, I strongly suspect that we
>> would want to make the validate_headref() function a file-scope
>> static in setup.c to make sure it is only called/callable from the
>> repository discovery codepath.  Especially that if somebody calls
>> this function again after we find out that the repository uses
>> SHA-256, we would want to let the caller know that the detached HEAD
>> records SHA-1 and we are in an inconsistent state.
>
> Fair enough, we can definitely do so. It only has a single callsite
> anyway.

I was wondering if I was missing a future plans to call it from
other code paths that are triggered after the set-up was done.  If
that is not the case, we should do so.  It matters more for the
future callers than the current ones.  They _all_ have to be aware
of the deliberate looseness of the check here.

Thanks.  




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux