Re: [BUG] You can't have single quote in your username

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

 



On Mon, Aug 26, 2019 at 03:14:55PM -0400, Jeff King wrote:
> We'd still want to keep the low-level removal of "<>\n", since those are
> syntactically significant to Git (i.e., if they sneak in you end up with
> a broken commit object).

Would it work to change `strbuf_addstr_without_crud()` such that instead of
removing crud from the beginning and *then* crud from the end, it removes crud
as long as it's palindromic? Then the function proceeds to remove "<>\n" from
the string as before.

That would implement the following _mappings_:

'Foo bar' => Foo bar
Micheal Jr. => Micheal Jr.
Mr. McDonalds => Mr. McDonalds
"John Baz" => John Baz
"JJ\x0a" => JJ

What do you think?



[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