"Michael S. Tsirkin" <m...@redhat.com> writes:
>> Is $author already sanitized at this point in the code? I see it
>> was unwrapped with unquote_rfc2047 after it was read from the From:
>> line; will it always be the same as sanitize_address($author) would
>> return, and if not, would you rather compare between sanitized
>> versions of sender and author, no?
> Yes. I'll have to look at the code more closely.
> In my testing author here is "Michael S. Tsirkin" <m...@redhat.com>
> so it matches the sanitized sender.
> Of course that's because my name does not have non-ascii,
> just a dot.
So the conclusion is that the logic to see if the names are the same
needs a bit more work than what was posted, I think?
>> Also, isn't the $sender the same during the whole outer loop that
>> iterates over @files? Do we need to apply sanitize_address() on it
>> over and over for each and every logical line in the @header?
>> This comment also applies to the other patch but they probably
>> should become a single patch anyway, I guess?
> OK so now you are ok with this last bit, right?
Sorry, but I am not sure what you are asking.
Do I think the assignment to $sanitized_sender can and should be
done just once, not once per file, if the code inspection tells us
that $sender is a constant inside the foreach (@files) loop?
Do I think these two are solving pretty much the same thing and is
better to be done in a single patch?
I didn't really think them through when I responded, but now after
you made me think, I would say the answers to both of them are yes.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html