*** majordomo.pl.old Wed Aug 27 10:58:53 1997 --- majordomo.pl Thu Dec 11 00:21:51 1997 *************** *** 13,16 **** # ! $EX_DATAERR = 65; ! $EX_TEMPFAIL = 75; $EX_NOUSER = 67; --- 13,16 ---- # ! $EX_DATAERR = 100; ! $EX_TEMPFAIL = 111; $EX_NOUSER = 67; *************** *** 152,153 **** --- 152,161 ---- + if (substr($a1, 0, 1) eq "&") { + $a1 = substr($a1, 1, length($a1) - 1); + } + + if (substr($a2, 0, 1) eq "&") { + $a2 = substr($a2, 1, length($a2) - 1); + } + if ($partial == 1) { *************** *** 588,591 **** ! # Look for addresses of the form rouilj@cs ! if (/\@/ && !/\./) { if (-e main'REPLY) { --- 596,599 ---- ! # Throw out any addresses without FQDN's ! if (! /\S+\@\S+\.\S+/ ) { if (-e main'REPLY) { *************** *** 599,601 **** } ! &main'log("WARNING", "Non-domained address: $_"); return undef; --- 607,609 ---- } ! &main'log("WARNING", "Unqualified address: $_"); return undef; *************** *** 613,617 **** # XXX Should at least tell the user that there was a problem. ! if ( /\|/ || /^-/ ) { ! &main'abort("HOSTILE ADDRESS (invalid first char or |) $addr"); #' return undef; } --- 621,630 ---- # XXX Should at least tell the user that there was a problem. ! if (! /^[A-Za-z0-9_.+=:%!~#\/\@-]+$/) { ! &main'abort("HOSTILE ADDRESS [$addr] (invalid char)"); #' return undef; + } + + if ( /^-/ ) { + &main'abort("HOSTILE ADDRESS [$addr] (invalid first char $1)"); #' + return undef; }