From:             
Operating system: Windows XP SP3 Professional
PHP version:      5.3.1RC2
Package:          mcrypt related
Bug Type:         Bug
Bug description:strange bug with mcrypt, base64 and mysql

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.


-- 
Edit bug report at http://bugs.php.net/bug.php?id=53496&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=53496&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=53496&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=53496&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=53496&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=53496&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=53496&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=53496&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=53496&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=53496&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=53496&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=53496&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=53496&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=53496&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=53496&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=53496&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=53496&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=53496&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=53496&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=53496&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=53496&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=53496&r=mysqlcfg

Reply via email to