Open sneakyimp opened 9 years ago
This library requires PHP >= 5.3.7 OR a version that has the $2y fix backported into it (such as RedHat provides). Note that Debian's 5.3.3 version is NOT supported.
Heheh, this isn't exactly the library's fault, there was a lot of bugginess during the transition to get bcrypt that took some patching to get right.
So you definitely want to get the server updated to the very latest version of php 5.3 to get any chance of a good working bcrypt (not sure that php 5.3 even -has- security support any more), and probably want to upgrade to php 5.4 or php 5.5 or whatever if you can push for that.
I'd argue it's Debian's fault for not backporting a serious security fix...
Also, 5.4 and 5.3 are both End-of-life. Suggest upgrading to 5.5 if possible.
I should have certainly checked the requirements more closely, but I was under the impression that Ubuntu might have made important security improvements to php5.3.3.
Perhaps there could be some kind of PHP version check so password_compat lets us know if our version of PHP isn't going to play nice? I tried rolling out a fix to our production machines using this library only to realize with the code in production that it wasn't going to work.
@sneakyimp check out #10 which details why that's not possible...
Ugh. Ghastly mess.
Yup. This is why I recommend people never use Distribution-provided PHP...
OK at a very inopportune moment, I learn that this third party library just doesn't work on one of my servers that badly needs these password hash functions.
my code:
the output:
BOOO! I'm pissed. The code seems to get all the way through the process until it gets to this point:
I've no idea what's failing but it looks like the crypt function isn't holding up its end of the bargain. The output:
What the heck?