svn: /web/php-bugs/trunk/www/ bug-pwd-finder.php bug.php patch-add.php report.php

From: Date: Sat, 06 Mar 2010 01:47:40 +0000
Subject: svn: /web/php-bugs/trunk/www/ bug-pwd-finder.php bug.php patch-add.php report.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-7503@lists.php.net to get a copy of this message
philip Sat, 06 Mar 2010 01:47:40 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=295878 Log: captcha answer can be 0, so changing empty to isset (thanks Yawk) Changed paths: U web/php-bugs/trunk/www/bug-pwd-finder.php U web/php-bugs/trunk/www/bug.php U web/php-bugs/trunk/www/patch-add.php U web/php-bugs/trunk/www/report.php Modified: web/php-bugs/trunk/www/bug-pwd-finder.php =================================================================== --- web/php-bugs/trunk/www/bug-pwd-finder.php 2010-03-06 01:34:48 UTC (rev 295877) +++ web/php-bugs/trunk/www/bug-pwd-finder.php 2010-03-06 01:47:40 UTC (rev 295878) @@ -19,7 +19,7 @@ if (isset($_POST['captcha']) && $bug_id != '') { // Check if session answer is set, then compare it with the post captcha value. // If it's not the same, then it's an incorrect password. - if (empty($_SESSION['answer']) || $_POST['captcha'] != $_SESSION['answer']) { + if (!isset($_SESSION['answer']) || $_POST['captcha'] != $_SESSION['answer']) { $errors[] = 'Incorrect Captcha'; } else { exit; Modified: web/php-bugs/trunk/www/bug.php =================================================================== --- web/php-bugs/trunk/www/bug.php 2010-03-06 01:34:48 UTC (rev 295877) +++ web/php-bugs/trunk/www/bug.php 2010-03-06 01:47:40 UTC (rev 295878) @@ -60,7 +60,7 @@ // Check if session answer is set, then compare it with the post captcha value. // If it's not the same, then it's an incorrect password. if (!$logged_in) { - if (empty($_SESSION['answer']) || $_POST['captcha'] != $_SESSION['answer']) { + if (!isset($_SESSION['answer']) || $_POST['captcha'] != $_SESSION['answer']) { $errors[] = 'Incorrect Captcha'; } } @@ -157,7 +157,7 @@ // Check if session answer is set, then compare it with the post captcha value. // If it's not the same, then it's an incorrect password. if (!$logged_in) { - if (empty($_SESSION['answer']) || $_POST['captcha'] != $_SESSION['answer']) { + if (!isset($_SESSION['answer']) || $_POST['captcha'] != $_SESSION['answer']) { $errors[] = 'Incorrect Captcha'; } } Modified: web/php-bugs/trunk/www/patch-add.php =================================================================== --- web/php-bugs/trunk/www/patch-add.php 2010-03-06 01:34:48 UTC (rev 295877) +++ web/php-bugs/trunk/www/patch-add.php 2010-03-06 01:47:40 UTC (rev 295878) @@ -72,7 +72,7 @@ * it with the post captcha value. If it's not * the same, then it's an incorrect password. */ - if (empty($_SESSION['answer']) || $_POST['captcha'] != $_SESSION['answer']) { + if (!isset($_SESSION['answer']) || $_POST['captcha'] != $_SESSION['answer']) { $errors[] = 'Incorrect Captcha'; } Modified: web/php-bugs/trunk/www/report.php =================================================================== --- web/php-bugs/trunk/www/report.php 2010-03-06 01:34:48 UTC (rev 295877) +++ web/php-bugs/trunk/www/report.php 2010-03-06 01:47:40 UTC (rev 295878) @@ -28,7 +28,7 @@ // Check if session answer is set, then compare it with the post captcha value. // If it's not the same, then it's an incorrect password. if (!$logged_in) { - if (empty($_SESSION['answer']) || $_POST['captcha'] != $_SESSION['answer']) { + if (!isset($_SESSION['answer']) || $_POST['captcha'] != $_SESSION['answer']) { $errors[] = 'Incorrect Captcha'; } }

« previous php.webmaster (#7503) next »