? Pending

User tests: Successful: Unsuccessful:

avatar demis-palma
demis-palma
10 Apr 2017

It seems that the original library is no longer maintained.

PHP 4 style constructors are deprecated, and will be removed in future.

Summary of Changes

Porting PasswordHash from PHP4 to PHP 5-7 syntax.
Run JUserHelperTest.php successfully.

avatar demis-palma demis-palma - open - 10 Apr 2017
avatar demis-palma demis-palma - change - 10 Apr 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 10 Apr 2017
Category External Library Libraries
avatar brianteeman
brianteeman - comment - 10 Apr 2017

Are we even using this code anymore?

avatar demis-palma
demis-palma - comment - 10 Apr 2017

I think we use it at least in manual and cookie login, in password reset request and a couple of other occurrences.

avatar mbabker
mbabker - comment - 10 Apr 2017

It is only used to validate passwords for user accounts created at ~ 2.5.18 thru 2.5.28 or 3.2.1 thru 3.2.7 which haven't been converted to bcrypt yet.

This is third party code. We shouldn't be touching it.

avatar demis-palma
demis-palma - comment - 10 Apr 2017

However, it raises E_DEPRECATED error, and will stop working in PHP 8.
Should we consider to adopt it in case we still need it, or remove it otherwise?

avatar mbabker
mbabker - comment - 10 Apr 2017

Depending on your operating configuration, Joomla core can emit E_DEPRECATED messages on every PHP release from 5.5 up to and including 7.1. It happens. We have accounted for it in our code to the extent practical, but it's not on us to fork third party code to keep error logs clean.

avatar brianteeman
brianteeman - comment - 10 Apr 2017

It is only used to validate passwords for user accounts created at ~ 2.5.18 thru 2.5.28 or 3.2.1 thru 3.2.7 which haven't been converted to bcrypt yet.

That's what I meant by

Are we even using this code anymore?

avatar mbabker
mbabker - comment - 10 Apr 2017

Yes, we are. If we stopped using it, user accounts on sites migrated from those versions to current Joomla would have to go through the password reset process to get back into their accounts (it's more likely those are active accounts if coming from 2.5 than 3.2). It is not the primary password hash though and will only trigger if a $P$ prefixed hash is given to the validator.

avatar demis-palma
demis-palma - comment - 10 Apr 2017

@mbabker if I persuade the author of the library to update it, can we import the new version as is?

avatar mbabker
mbabker - comment - 10 Apr 2017

Absolutely. However @photodude has tried too and so far, while he's willing to push an update, it's a low priority task for him.

avatar photodude
photodude - comment - 10 Apr 2017

Last update I was told maybe at the end of the month or beginning of next month the update to phpass will happen.

avatar photodude
photodude - comment - 10 Apr 2017

@demis-palma by the way, this is technically correct but functionally the wrong way to fix this as your change would break backward compatibility. Please look at my PR #13813 (closed as the original developer is going to push an update with additional changes) in that you can see the correct way to address both old constructors for B/C and fix the deprecation notice.

Read http://cweiske.de/tagebuch/php4-constructors-php7.htm for an explanation on this B/C fix.

You can also look at my fork of the project that's available until PHPASS has an official update. https://github.com/photodude/phpass (NOTE: there are additional untested changes in this fork, it is only intended as a code example for recommended changes to facilitate an update from the original developer)

avatar zero-24
zero-24 - comment - 10 Apr 2017

Ok so we can close here and move this to an issue until the original author updated the lib?

avatar wilsonge wilsonge - change - 10 Apr 2017
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2017-04-10 20:14:32
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 10 Apr 2017
avatar photodude
photodude - comment - 3 May 2017

here is the PR with the new version
#15704

Add a Comment

Login with GitHub to post a comment