summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko2017-10-05 17:18:23 +0200
committerDenys Vlasenko2017-10-05 17:18:23 +0200
commit1121b4e568b340cfe2a9b7fc41fb48f4d684ad47 (patch)
tree4dedd5ad7bbddd91873821adba01634e508b4dcf
parent2ab9403119399ffda26f6ff83ec60ac257c29898 (diff)
downloadbusybox-1121b4e568b340cfe2a9b7fc41fb48f4d684ad47.zip
busybox-1121b4e568b340cfe2a9b7fc41fb48f4d684ad47.tar.gz
sendmail allow "=" symbol in recipient, closes 10241
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--mailutils/sendmail.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/mailutils/sendmail.c b/mailutils/sendmail.c
index defbd95..4ca91fa 100644
--- a/mailutils/sendmail.c
+++ b/mailutils/sendmail.c
@@ -150,7 +150,13 @@ static char *sane_address(char *str)
trim(str);
s = str;
while (*s) {
- if (!isalnum(*s) && !strchr("+_-.@", *s)) {
+ /* Standard allows these chars in username without quoting:
+ * /!#$%&'*+-=?^_`{|}~
+ * and allows dot (.) with some restrictions.
+ * I chose to only allow a saner subset.
+ * I propose to expand it only on user's request.
+ */
+ if (!isalnum(*s) && !strchr("=+_-.@", *s)) {
bb_error_msg("bad address '%s'", str);
/* returning "": */
str[0] = '\0';