Announcement

#1 2023-09-06 09:32:22

deemon
Member
2021-05-03
45

[resolved] New users can't log in. (new password hash problem)

Hello/Hi/Greetings,

Have not created new users in a while, but today needed to and can't. I mean I can create a user, but he can't log in. Gives error "Invalid username or password!" even with the simplest password.

Old users can still log in luckily.

(Copy here your environment details, found on your Piwigo page [Administration > Tools > Maintenance])

    Piwigo 13.8.0 Check for upgrade
    Installed on 11 May 2016, 7 years 3 months 3 weeks 4 days ago
    Operating system: Linux
    PHP: 7.1.33-4+0~20200123.30+debian9~1.gbpdc2095 (Show info) [2023-09-06 10:30:21]
    MySQL: 5.5.5-10.1.48-MariaDB-1~stretch [2023-09-06 10:30:21]
    Graphics Library: External ImageMagick 6.9.7-4
    Cache size 40726.32 Mo   calculated 1 year ago Refresh

Activated plugin list 6

    Additional Pages
    Check Uploads
    Fotorama
    LocalFiles Editor
    Log Failed Logins
    Personal Favicon

Last edited by deemon (2023-09-06 10:48:41)

Offline

 

#2 2023-09-06 10:43:46

deemon
Member
2021-05-03
45

Re: [resolved] New users can't log in. (new password hash problem)

Troubleshooted a bit. Went into MYSQL.

New user is created indeed. However something is wrong with password hash generation now since one of the last updates?
New user has password hash, yes, but can't log in with the set password.
When I copied my own old user password hash in mysql to new user password hash, i was able to log in with the new user (and my password)!

However I would really like to set a new password for the new user... so any trick to manually generate working hashes from passwords that are able to log in until this gets fixed?

Last edited by deemon (2023-09-06 10:47:04)

Offline

 

#3 2023-09-06 11:34:50

erAck
Only trying to help
2015-09-06
2043

Re: [resolved] New users can't log in. (new password hash problem)

Ensure that the stored password hash starts with $P$, if it doesn't then some other hashing algorithm was used than the portable one of include/passwordhash.class.php
See [Forum, post 181215 by erAck in topic 31381] Lost password and see if its generated password hash works.

Apart from that, you should upgrade from your PHP 7.1.33 that is outdated and EOL for years, use PHP 8.1


Running Piwigo at https://erack.net/gallery/

Offline

 

#4 2023-09-06 15:07:07

deemon
Member
2021-05-03
45

Re: [resolved] New users can't log in. (new password hash problem)

Thank you very much. Password hash generated this way and inserted manually to MySQL works.
(the original problematic non working passwords/hashes looked also legit, starting with $P$G like the rest of them.)

More mysterious is that now tested to create another 2 users and those worked instantly. Also changing the password from admin.php UI worked. Like ... it should have all along.

Now the question remains, why creating new user and changing password in admin.php UI did not work for a while there (almost half a day) and then started to work again "by itself". In 2 different servers (test and live) - failed for several hours and then started to work in both now. What is happening?

Last edited by deemon (2023-09-06 15:14:33)

Offline

 

#5 2023-09-07 11:57:53

erAck
Only trying to help
2015-09-06
2043

Re: [resolved] New users can't log in. (new password hash problem)

We don't know what's wrong with your outdated system(s)..


Running Piwigo at https://erack.net/gallery/

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact