|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-01-24 00:07 UTC] googleguy@php.net
-Assigned To:
+Assigned To: googleguy
[2014-01-24 00:07 UTC] googleguy@php.net
[2014-01-28 10:29 UTC] googleguy@php.net
[2014-01-28 13:10 UTC] googleguy@php.net
[2014-01-28 13:14 UTC] googleguy@php.net
-Status: Assigned
+Status: Closed
[2014-01-28 13:14 UTC] googleguy@php.net
[2014-02-22 16:22 UTC] ircmaxell@php.net
[2014-02-23 14:00 UTC] mail at michalspacek dot cz
[2014-02-24 16:22 UTC] googleguy@php.net
[2014-02-24 16:22 UTC] googleguy@php.net
-Status: Closed
+Status: Re-Opened
[2014-02-24 16:24 UTC] googleguy@php.net
[2014-03-06 23:02 UTC] narf at devilix dot net
[2014-06-27 15:00 UTC] tyrael@php.net
[2014-07-17 22:14 UTC] ircmaxell@php.net
[2015-08-23 04:52 UTC] googleguy@php.net
-Status: Re-Opened
+Status: Closed
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 07 05:00:01 2025 UTC |
Description: ------------ It seems there is a limit to the input length of the password/str parameter to crypt(), however this is not documented anywhere. This has profound security implications, and all users should be aware of the issue. My preference would be a warning/notice triggered when you exceed the length, as well as documentation on this. Test script: --------------- $long = str_repeat('a', 100); var_dump(crypt($long . "1", '$2y$04$saltysaltysaltysaltytt')); var_dump(crypt($long . "2", '$2y$04$saltysaltysaltysaltytt')); var_dump(crypt($long . "12", '$2y$04$saltysaltysaltysaltytt')); Expected result: ---------------- A different hash in each case Actual result: -------------- string(60) "$2y$04$saltysaltysaltysaltyte9usMwh4/IIx0al18sl5oEFVM2Z/XJ7q" string(60) "$2y$04$saltysaltysaltysaltyte9usMwh4/IIx0al18sl5oEFVM2Z/XJ7q" string(60) "$2y$04$saltysaltysaltysaltyte9usMwh4/IIx0al18sl5oEFVM2Z/XJ7q"