php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53496 strange bug with mcrypt, base64 and mysql
Submitted: 2010-12-08 12:44 UTC Modified: 2012-02-21 07:40 UTC
From: ulrich1992 at web dot de Assigned:
Status: Not a bug Package: mcrypt related
PHP Version: 5.3.1RC2 OS: Windows XP SP3 Professional
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ulrich1992 at web dot de
New email:
PHP Version: OS:

 

 [2010-12-08 12:44 UTC] ulrich1992 at web dot de
Description:
------------
I'm doing a webshop system, and I think, I have found a strange bug in mcrypt.
I have to encrypt a string with a number(secret PIN), then encode it with base64, and insert it to a datebase (MySQL).

Then in the admin frontend for my shop, I have to decode and decrypt it, to show it to the shop administrator.
This works in the most of cases. But for example when the PIN is "1234" and the key is "ganzgehein", and I try to decrypt it, it only produces binary rubbish, instead of the expected PIN.
I can't reproduce this bug in a single example file, so i have to upload my complete project. Sorry it's in german language, but there is not very much text, so I think you can understand it by using a automatic translator like Googles.

PS: I am using XAMPP

Test script:
---------------
http://www.file-upload.net/download-3032467/mcrypt_bug_demo.zip.html

It's hosted on file-upload.net because I can't install a ftp client on this machine.

Expected result:
----------------
See notice_for_bugreport.txt for details.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-08 13:21 UTC] pajoye@php.net
-Status: Open +Status: Feedback
 [2010-12-08 13:21 UTC] pajoye@php.net
Please try with a decent version, like 5.3.4RC2 or 5.3.3.
 [2010-12-08 14:20 UTC] derick@php.net
Also, you need to provide a *short* reproducible script. Not your whole webshop.
 [2012-02-21 07:40 UTC] rasmus@php.net
No feedback for over a year and I highly doubt this is an actual bug.
 [2012-02-21 07:40 UTC] rasmus@php.net
-Status: Feedback +Status: Not a bug
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 10 06:01:26 2024 UTC