git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] send-email: add extra safetly in address sanitazion

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Feb 5, 2012, 20:51 UTC
Message-ID
<CAMP44s1wqmT4mavsXrEhB-OquOtQrYnnoSoX9G7X4wzFoMD29A@mail.gmail.com>
In-Reply-To
<87sjipxe5u.fsf@thomas.inf.ethz.ch>
2012/2/5 Thomas Rast <trast@inf.ethz.ch>:
Show 17 quoted lines
> Felipe Contreras <felipe.contreras@gmail.com> writes:
>
>> Currently bad addresses like 'Foo Bar <foo@bar.com>>' will just be sent
>> verbatim -- that's not good; we should either error out, or sanitize
>> them.
>>
>> The following patch adds extra sanitazion so the following
>> transformations are performed:
>>
>>   'Foo Bar <foo@bar.com>' -> 'Foo Bar <foo@bar.com>'
>>   '"Foo Bar" <foo@bar.com>' -> '"Foo Bar" <foo@bar.com>'
>>   'foo@bar.com' -> 'foo@bar.com'
>>   '<foo@bar.com>' -> 'foo@bar.com'
>>   'Foo Bar' -> 'Foo Bar'
>
> Am I the only one who stared at this for ten seconds, only to then
> realize that there is no sanitizing whatsoever going on here?
There is: '<foo@bar.com>' -> 'foo@bar.com'
Show 6 quoted lines
>>   'Foo Bar <foo@bar.com>>' -> 'Foo Bar <foo@bar.com>'
>>   '"Foo Bar" <foo@bar.com>>' -> '"Foo Bar" <foo@bar.com>'
>>   '<foo@bar.com>>' -> 'foo@bar.com'
>
> All of these are the same underlying issue.  Does your patch fix any
> other malformed addresses, or just this particular type?
See above.
-- 
Felipe Contreras
Previous: Thomas RastNext: Thomas Rast
Message 3 of 7 in “send-email: add extra safetly in address sanitazion”
  1. send-email: add extra safetly in address sanitazionFelipe Contreras, Feb 4, 2012
  2. Thomas RastFeb 5, 2012
  3. Felipe ContrerasFeb 5, 2012
  4. Thomas RastFeb 5, 2012
  5. Felipe ContrerasFeb 6, 2012
  6. Junio C HamanoFeb 6, 2012
  7. Junio C HamanoFeb 5, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.