in reply to securing code
I would like to mention 2 potential security risks:
if( /^Subject: (.+)$/ ) { $original_subject = $1; if( $modify_subject ) { print LOG "Subject modified\n" if( $log ); s/$1/[friends]: $original_subject/; } }
Consider using:
s/Subject: /Subject: [friends]: /;
While I know sender is matched at the beginning withopen( MAIL, "|$sendmail -f $myaddress $sender" );
there are better ways to do this. One of them is using the sender in the From header before printing the message./^From ([-a-zA-Z0-9_.@]+) .+$/
Hope this helps...
Aziz,,,
P.S. I suggest removing all the s/f.../f***/ stuff and replacing it with a hash of words=>substitues.
|
---|