Re: [PATCH v3 2/2] usage: add warn_once() helper for repeated warnings

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

 



On 6/1/2022 4:21 PM, Junio C Hamano wrote:
> Derrick Stolee <derrickstolee@xxxxxxxxxx> writes:
> 
>> We could certainly investigate this more, but it seems like a more
>> problematic approach than the one taken here. We could add a "is_valid"
>> bit to struct remote, but then could some code path modify that struct
>> after it was validated?
> 
> Two separate parser parsing the same string to produce (supposedly)
> equivalent parse results is a bit disturbing, and I am not sure if
> "is_valid" bit helps that.
> 
> Adding "user" and "password" members to the struct, and retire the
> existing "parser" (instead it would just use the pre-parsed
> components stored in the struct) would.  It would be a much more
> involved change, and it is something more than we would want to do
> in a regression fix patch.
> 
> But this series is a new feature development, so...

Yes, you're right. I should use the output 'struct url_inf' from
url_normalize() to construct the redacted URL. It has the downside
that the output URL can be slightly different from the input URL,
but a user should still be able to diagnose how to resolve the
situation.

Thanks,
-Stolee



[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