|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-06-24 01:57 UTC] screen at brainkrash dot com
Description:
------------
Upgraded to 4.3.6 from 4.3.4 and cracklib crack_check errors on crack_check when passed the result from a successful crack_openict. I've tested on a linux build and on win32 (binary distro). crack_opendict appears does return a "resource" with no errors but crack_check returns the following error:
Warning: crack_check(): 209064108 is not a valid cracklib dictionary resource in...
a subsequent call to crack_getlastmessage gives the following warning:
Warning: crack_getlastmessage(): No obscure checks in this session in...
Reproduce code:
---------------
$dict = crack_opendict("/usr/lib/cracklib_dict");
$strong = crack_check($dict, 'password');
print("dict: $dict<br>");
print("strong: $strong<br>");
Expected result:
----------------
dict: Resource id #60
strong: 0
Actual result:
--------------
Warning: crack_check(): 216275340 is not a valid cracklib dictionary resource in c:\usr\local\www\v2\common\auth\classes\class.BrainKrash_Auth.php on line 704
dict: Resource id #60
strong:
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 23 17:00:01 2025 UTC |
I get it too.. PHP Version => 4.3.8 sys-libs/cracklib-2.7-r8 # md5sum /usr/lib/cracklib_dict.hwm 94ab9cf6af519cbd9467353082453e80 /usr/lib/cracklib_dict.hwm strace: ----- open("/usr/lib/cracklib_dict.pwd", O_RDONLY) = 3 open("/usr/lib/cracklib_dict.pwi", O_RDONLY) = 7 open("/usr/lib/cracklib_dict.hwm", O_RDONLY) = 8 fstat64(7, {st_mode=S_IFREG|0644, st_size=77356, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40015000 read(7, "1Vwp|\270\4\0\20\0\0\0\0\0\0\0@\0\0\0\206\0\0\0\350\0\0"..., 4096) = 4096 fstat64(8, {st_mode=S_IFREG|0644, st_size=1024, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40016000 read(8, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 1024 write(1, "\nWarning: crack_check(): 308 is "..., 139) = 139 -----