From:             screen at brainkrash dot com
Operating system: Win32/Linux
PHP version:      4.3.6
PHP Bug Type:     Unknown/Other Function
Bug description:  Cracklib crack_check does not accept resource from crack_opendict

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:

-- 
Edit bug report at http://bugs.php.net/?id=28905&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28905&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28905&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=28905&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=28905&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=28905&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=28905&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=28905&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=28905&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=28905&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=28905&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=28905&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=28905&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28905&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=28905&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=28905&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=28905&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28905&r=float

Reply via email to