ID: 47445
Updated by: [email protected]
Reported By: niall dot ocallaghan at gmail dot com
Status: Open
Bug Type: mcrypt related
Operating System: Windows Vista Ultimate SP1
PHP Version: 5.2CVS-2009-02-19 (snap)
New Comment:
I can reproduce it on Linux.
{"fg_class_name":"Match","fg_client_api":"d26ec6a426b128c7001a7292a2ad1c0929cd64d7","fg_client_id":1,"fg_direction":"desc","fg_extras":{"GameWeekId":"1"},"fg_method_name":"getMatches","fg_page":1,"fg_request_time":"0.25800200
1235003390","fg_sort":2,"fg_hash":"4e5746e21919d087c69642898b5e46452ce�."P�-
Previous Comments:
------------------------------------------------------------------------
[2009-02-19 01:44:14] niall dot ocallaghan at gmail dot com
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 this bug report at http://bugs.php.net/?id=47445&edit=1