From: [EMAIL PROTECTED]
Operating system: Unix
PHP version: 4.2.0
PHP Bug Type: mcrypt related
Bug description: possible bad padding
I noticed something quite strange when using the mcrypt library to encrypt
data.
say i would encrypt $data in mode ECB:
$l = mcrypt_encrypt(MCRYPT_BLOWFISH, $key, $data, MCRYPT_MODE_ECB, $iv);
then decrypt it:
$l = mcrypt_decrypt(MCRYPT_BLOWFISH, $key, $data, MCRYPT_MODE_ECB, $iv);
It seems like the padding prevents me from using the variable correctly in
some conditions.
As explained in the documentation, the padding is made of '\0' and in the
following example:
<? exec("echo.sh $l foobar", $value, $return);
exec would actually stop at $l because of the '\0' and not pass the
'foobar' arg.
I don't know if this is a known bug or a "supposed" behaviour, but it is
surely annoying :)
--
Edit bug report at http://bugs.php.net/?id=17062&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17062&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17062&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17062&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17062&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17062&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17062&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17062&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17062&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17062&r=globals