Bug #69686 [NEW]: password_verify reports back error on PHP7 will null string
| From: | ccornutt at phpdeveloper dot org | Date: | Thu, 21 May 2015 20:48:57 +0000 |
| Subject: | Bug #69686 [NEW]: password_verify reports back error on PHP7 will null string | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-192814@lists.php.net to get a copy of this message | ||
From: ccornutt at phpdeveloper dot org
Operating system: Linux
PHP version: master-Git-2015-05-21 (Git)
Package: hash related
Bug Type: Bug
Bug description:password_verify reports back error on PHP7 will null string
Description:
------------
A password_verify call with a second parameter value of null an error is
reported in PHP 7 where none was thrown in PHP 5.5:
Example: "Deprecated: password_verify(): Supplied salt is not valid for
DES. Possible bug in provided salt format. in /in/ThW5f on line 6"
http://3v4l.org/ThW5f
Test script:
---------------
<?php
// Run in current version of PHP 7
$input = 'test';
$hash = null;
$result = password_verify($input, $hash);
var_export($result);
Expected result:
----------------
false (as it was in PHP 5.5) as the string to verify isn't even valid
Actual result:
--------------
The way HHVM handles it would be nice:
Catchable fatal error: Argument 2 passed to password_verify() must be an
instance of string, null given in /in/ThW5f on line 6
--
Edit bug report at https://bugs.php.net/bug.php?id=69686&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69686&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69686&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69686&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69686&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69686&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69686&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69686&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69686&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69686&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69686&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69686&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69686&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69686&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69686&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69686&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69686&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69686&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69686&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69686&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69686&r=mysqlcfg