|
From: | Paul Vixie |
Subject: | Re: [Nmh-workers] proposed patch for shell metacharacter failure in nmh-1.7 |
Date: | Mon, 15 Jan 2018 14:34:01 -0800 |
User-agent: | Postbox 5.0.22 (Windows/20171208) |
because i call sendmail from popen() in cron, i had this problem with MAILTO= values. i first decided to accept only @, %, ::, and %. but then people with strange login shells or strange non-posix /bin/sh implementations reported trouble. now i allow isalnum() only, and if they want something else, they can put it in /etc/aliases or whatever.
for MH we should allow only metacharacters we handle explicitly, and we should use strsep() rather than /bin/sh to make our argument vectors, and we should call execve() rather than popen().
in other words, the reason this is hard to do, is that it's a bad idea. vixie
[Prev in Thread] | Current Thread | [Next in Thread] |