Bug #79555 [NEW]: crypt function gives same output with different inputs that are similar

From: Date: Sat, 02 May 2020 01:48:39 +0000
Subject: Bug #79555 [NEW]: crypt function gives same output with different inputs that are similar
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-226876@lists.php.net to get a copy of this message
From: subless at yahoo dot com Operating system: macOS Sierra PHP version: 7.3.17 Package: hash related Bug Type: Bug Bug description:crypt function gives same output with different inputs that are similar Description: ------------ https://ideone.com/srWv2p The link above is some example code where the string input is slightly different and they all have the same salt, but the output is the exact same each time. Some input-character modifications will change the output which is intended but it's broken so far. Test script: --------------- <?php echo crypt("passwordpasswoRd", "SALT"); echo "\n"; echo crypt("passwordpassWorD", "SALT"); echo "\n"; echo crypt("passwordPassworD", "SALT"); echo "\n"; echo crypt("passwordpaSSworD", "SALT"); echo "\n"; echo crypt("passwordpassworD", "SALT"); ?> Expected result: ---------------- Since the input string is slightly different, I expect to see different output results not identical. -- Edit bug report at https://bugs.php.net/bug.php?id=79555&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79555&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79555&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79555&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79555&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79555&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79555&r=support Expected behavior: https://bugs.php.net/fix.php?id=79555&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79555&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79555&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79555&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79555&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79555&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79555&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79555&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79555&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79555&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79555&r=mysqlcfg

« previous php.bugs (#226876) next »