From: niall dot ocallaghan at gmail dot com Operating system: Windows Vista Ultimate SP1 PHP version: 5.2CVS-2009-02-19 (snap) PHP Bug Type: mcrypt related Bug description: Inconsistent results
Description: ------------ When attempting to encrypt a JSON encoded string using a secret key, I get inconsistent results depending on the data and the key I used. I have managed to recreate this and believe it is an issue with the mcrypt module. The JSON string is 303 characters in length, and simply by changing on character from a 6 to a 7, it fixes the problem. I have included a URL for reproducing this error Reproduce code: --------------- http://78.137.160.50/fcl/bug.txt Please note in the above code I have given two example strings. The first does not work (and is a reproduction of this bug), the second does. They are identical strings except for the character at position 297. I changed the 6 to a 7 and it fixes the problem Expected result: ---------------- I expect to see a decrypted value of the string. Actual result: -------------- I see 99% of the string has been decrypted however the last few characters are corrupt. -- Edit bug report at http://bugs.php.net/?id=47445&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47445&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47445&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47445&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47445&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47445&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47445&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47445&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47445&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47445&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47445&r=support Expected behavior: http://bugs.php.net/fix.php?id=47445&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47445&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47445&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47445&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47445&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=47445&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47445&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47445&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47445&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47445&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47445&r=mysqlcfg
