1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-18 18:16:08 +02:00

Fix recipient santitization

Need to quote all special characters, not just the first one

Signed-off-by: Horst H. von Brand <vonbrand@inf.utfsm.cl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Horst H. von Brand 2008-03-28 11:09:04 -03:00 committed by Junio C Hamano
parent e4d594c6bd
commit 18023c2065

View File

@ -633,7 +633,7 @@ sub sanitize_address
# double quotes are needed if specials or CTLs are included
elsif ($recipient_name =~ /[][()<>@,;:\\".\000-\037\177]/) {
$recipient_name =~ s/(["\\\r])/\\$1/;
$recipient_name =~ s/(["\\\r])/\\$1/g;
$recipient_name = "\"$recipient_name\"";
}