Req #61888 [NEW]: crypt() should be documented as not binary safe

From: Date: Tue, 01 May 2012 13:10:54 +0000
Subject: Req #61888 [NEW]: crypt() should be documented as not binary safe
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-8317@lists.php.net to get a copy of this message
From:             
Operating system: 
PHP version:      5.4.1
Package:          Documentation problem
Bug Type:         Feature/Change Request
Bug description:crypt() should be documented as not binary safe

Description:
------------
http://www.php.net/manual/en/function.crypt.php

I understand that crypt() must not be binary safe in order to maintain 
compatibility with other implementations, but it should be clearly stated
in the 
crypt() documentation, since it might lead to unexpected results (for
example, 
when feeding raw bytes directly into crypt()).

Test script:
---------------
For example, this two lines generate the same output, which is correct, but
can be confusing:

echo crypt("aaa", '$2a$07$usesomesillystringforsalt$');
echo crypt("aaa\x00aa", '$2a$07$usesomesillystringforsalt$');


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



Thread (4 messages)

« previous php.doc.bugs (#8317) next »