svn: /web/php-bugs/trunk/include/ functions.inc

From: Date: Thu, 20 Aug 2009 09:09:25 +0000
Subject: svn: /web/php-bugs/trunk/include/ functions.inc
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-5694@lists.php.net to get a copy of this message
bjori Thu, 20 Aug 2009 09:09:25 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=287496 Log: Lets not allow people to send spam when editing bug reports.. Fixes bug#49307 Bug: http://bugs.php.net/49307 (Open) Another test Changed paths: U web/php-bugs/trunk/include/functions.inc Modified: web/php-bugs/trunk/include/functions.inc =================================================================== --- web/php-bugs/trunk/include/functions.inc 2009-08-20 09:03:19 UTC (rev 287495) +++ web/php-bugs/trunk/include/functions.inc 2009-08-20 09:09:25 UTC (rev 287496) @@ -372,16 +372,24 @@ $Cc = "Cc: doc-bugs@lists.php.net\n"; } + $tmp = $edit != 3 ? $in : $bug; + $mail = array( + "from" => str_replace(array("\n", "\r"), "", $from), + "php_version" => str_replace(array("\n", "\r"), "", $tmp['php_version']), + "bug_type" => str_replace(array("\n", "\r"), "", $tmp['bug_type']), + "php_os" => str_replace(array("\n", "\r"), "", $tmp['php_os']), + ); + # but we go ahead and let the default sender get used for the list @mail($mailto, rinse($subj) . txfield('sdesc'), $dev_text, - "From: $from\n". + "From: {$mail["from"]}\n". $Cc. "X-PHP-Bug: $bug[id]\n". - "X-PHP-Version: " . stripslashes((($edit != 3) ? $in['php_version'] : $bug['php_version'])) . "\n" . - "X-PHP-Category: " . stripslashes((($edit != 3) ? $in['bug_type'] : $bug['bug_type'])) . "\n" . - "X-PHP-OS: " . stripslashes((($edit != 3) ? $in['php_os'] : $bug['php_os'])) . "\n" . + "X-PHP-Version: " . stripslashes($mail['php_version']) . "\n" . + "X-PHP-Category: " . stripslashes($mail['bug_type']) . "\n" . + "X-PHP-OS: " . stripslashes($mail['php_os']) . "\n" . "X-PHP-Status: " . stripslashes($new_status) . "\n" . "X-PHP-Old-Status: " . stripslashes($old_status) . "\n" . "X-PHP-Reported-By: " . stripslashes(spam_protect(rinse($bug['email']))) . "\n" .

« previous php.webmaster (#5694) next »