aboutsummaryrefslogtreecommitdiff
path: root/notes.c
diff options
context:
space:
mode:
authorKrzysztof Mazur <krzysiek@podlesie.net>2012-11-22 19:12:09 +0100
committerJunio C Hamano <gitster@pobox.com>2012-11-26 08:22:04 -0800
commit95c0d4b68a0fcba3adf45ce3a8f1edf99a9030a1 (patch)
tree97d2cd6f758c5bb318926b86e8bca814cbc519d2 /notes.c
parent831a488b76e0fcad68c6d1c7aaf9f086199e1738 (diff)
downloadgit-95c0d4b68a0fcba3adf45ce3a8f1edf99a9030a1.tar.gz
git-95c0d4b68a0fcba3adf45ce3a8f1edf99a9030a1.tar.xz
git-send-email: fix fallback code in extract_valid_address()
In the fallback check, used when Email::Valid is not available, the extract_valid_address() uses $1 without checking for success of matching regex. The $1 variable may still hold the result of previous match, which is the address when email address was in '<>' or be undefined otherwise. Now if match fails undefined value is always returned to indicate error. The same value is used by Email::Valid->address() in that case. Previously 'foo@bar' address was rejected by Email::Valid and fallback, but '<foo@bar>' was rejected by Email::Valid, but accepted by fallback. Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'notes.c')
0 files changed, 0 insertions, 0 deletions