|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2011-05-12 17:50 UTC] os at irj dot ru
Description:
------------
Win 7 x64
PHP 5.3.6 x86 MSVC9 (Visual C++ 2008) Thread Safety AS Apache 2.2 Module
Apache/2.2.17 x86 NO SSL
Test script:
---------------
<pre>
<?php
echo crypt("dev", '$1$dW0.is5.$10CH101gGOr1677ZYd517.');
?>
Expected result:
----------------
$1$dW0.is5.$10CH101gGOr1677ZYd517.
Actual result:
--------------
FireFox 4:
$1$dW0.is5.$fELOCg/o4M4JSqjT0FAaZ1
IE 9 with meny F5 refresh actual result is
Result 1: $1$dW0.is5.$PAX1vDQNMC0Ag2U3joEb71
Result 2: $1$dW0.is5.$fELOCg/o4M4JSqjT0FAaZ1
in cycle
If I reload apache 2 service hash result are changing to other, etc
FF: $1$dW0.is5.$j9t0S3va.9brcE2kIILGx1
IE: $1$dW0.is5.$d2QAXWA.uqHWaY1KopvYr., $1$dW0.is5.$j9t0S3va.9brcE2kIILGx1
Patchesfix (last revision 2011-05-21 12:56 UTC by os at irj dot ru)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 05:00:02 2025 UTC |
On FreeBSD I got (which uses system's crypt): <?php echo crypt("dev", '$1$dW0.is5.$10CH101gGOr1677ZYd517.'); ?> .ionEGu/npGjI With the proposed fix, I got on windows (which is what this bug is about): $1$dW0.is5.$Jay703TqfAIolX2oUKG7u1 Which is not what the initial report says, it expects: $1$dW0.is5.$10CH101gGOr1677ZYd517. And using the tests provided privately: <?php echo crypt("", '$1$dW0.is5.$10CH101gGOr1677ZYd517.') . "\n"; echo crypt("b", '$1$dW0.is5.$10CH101gGOr1677ZYd517.') . "\n"; echo crypt("bu", '$1$dW0.is5.$10CH101gGOr1677ZYd517.') . "\n"; echo crypt("bug", '$1$dW0.is5.$10CH101gGOr1677ZYd517.') . "\n"; echo crypt("pass", '$1$dW0.is5.$10CH101gGOr1677ZYd517.') . "\n"; echo crypt("buged", '$1$dW0.is5.$10CH101gGOr1677ZYd517.') . "\n"; echo crypt("aaaaaaaaaaaaaaaaaaaaaaaaa ", '$1$dW0.is5.$10CH101gGOr1677ZYd517.') . "\n"; ?> Windows (with patch): $1$dW0.is5.$I0iqTYHPzkP4YnRgnXxZW0 $1$dW0.is5.$geEFTh1pYyBlKNV7Jd0jJ0 $1$dW0.is5.$J9qpZsnaE3ddwR9CfXJq71 $1$dW0.is5.$5tcolHQsY5Pxr8vn4rzdN/ $1$dW0.is5.$2E4/ZDY1vr73HqLl1bLs9. $1$dW0.is5.$lvGhphTQwqgKxWhWwYERr1 $1$dW0.is5.$XzsWcLSBj2BvhOKH0xdpZ0 FreeBSD: $1$dW0.is5.$I0iqTYHPzkP4YnRgnXxZW0 $1$dW0.is5.$KaspRpPQ9U7Xb5Vv5c.WE/ $1$dW0.is5.$X9G1x/Ep8zYQSrU4/lKUg. $1$dW0.is5.$wE5Rz/HxPtDMfqil6kK980 $1$dW0.is5.$2E4/ZDY1vr73HqLl1bLs9. $1$dW0.is5.$lvGhphTQwqgKxWhWwYERr1 $1$dW0.is5.$XzsWcLSBj2BvhOKH0xdpZ0 I don't think the patch or the initial report is correct and it somehow confirms my thoughts, len>16 is really implementation specific. Or did I miss something?