diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-10-05 17:18:23 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-10-05 17:18:23 +0200 |
commit | 1121b4e568b340cfe2a9b7fc41fb48f4d684ad47 (patch) | |
tree | 4dedd5ad7bbddd91873821adba01634e508b4dcf | |
parent | 2ab9403119399ffda26f6ff83ec60ac257c29898 (diff) | |
download | busybox-w32-1121b4e568b340cfe2a9b7fc41fb48f4d684ad47.tar.gz busybox-w32-1121b4e568b340cfe2a9b7fc41fb48f4d684ad47.tar.bz2 busybox-w32-1121b4e568b340cfe2a9b7fc41fb48f4d684ad47.zip |
sendmail allow "=" symbol in recipient, closes 10241
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | mailutils/sendmail.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mailutils/sendmail.c b/mailutils/sendmail.c index defbd9552..4ca91fad8 100644 --- a/mailutils/sendmail.c +++ b/mailutils/sendmail.c | |||
@@ -150,7 +150,13 @@ static char *sane_address(char *str) | |||
150 | trim(str); | 150 | trim(str); |
151 | s = str; | 151 | s = str; |
152 | while (*s) { | 152 | while (*s) { |
153 | if (!isalnum(*s) && !strchr("+_-.@", *s)) { | 153 | /* Standard allows these chars in username without quoting: |
154 | * /!#$%&'*+-=?^_`{|}~ | ||
155 | * and allows dot (.) with some restrictions. | ||
156 | * I chose to only allow a saner subset. | ||
157 | * I propose to expand it only on user's request. | ||
158 | */ | ||
159 | if (!isalnum(*s) && !strchr("=+_-.@", *s)) { | ||
154 | bb_error_msg("bad address '%s'", str); | 160 | bb_error_msg("bad address '%s'", str); |
155 | /* returning "": */ | 161 | /* returning "": */ |
156 | str[0] = '\0'; | 162 | str[0] = '\0'; |