Security regression on password (PASSWORD_HIDDEN) from commit 5c5b99fc9ad33054fb0291b92084e00ae1e634ef
On Etherpad 1.8.4 with Docker + postgresql, admin password can be used only once and is then replaced by "PASSWORD_HIDDEN" (on login form, password that is indeed checked, not only in cache). This seems to be a regression from 5c5b99fc9ad33054fb0291b92084e00ae1e634ef => https://github.com/anttiviljami/etherpad-lite/commit/5c5b99fc9ad33054fb0291b92084e00ae1e634ef
See : #3421
Even reading the code it is only setting the password in the database, how that string lands at the client baffles me...
Confirmed. Many thanks @alasserr for reporting this.
This bug impacts the users defined in settings.json. At least for the users that have access to the /admin area, after a single login their password is implicitly changed to PASSWORD_HIDDEN.
The bug may impact non-administrative users, too, but I did not test them.
Minimal test case
-
supposing
settings.jsoncontains the following snippet:"users": { "admin": { "password": "pwd", "is_admin": true }, } -
successful login to the admin console with the correct password:
$ curl -u "admin:pwd" http://localhost:9001/admin/ <!doctype html> <html> <head> <title>Admin Dashboard - Etherpad</title> [...] </html> -
subsequent logins with the correct password fail (to do this in a browser, reset everything via
CTRL + SHIFT + DEL):$ curl -u "admin:pwd" http://localhost:9001/admin/ Authentication required -
the password of
adminis nowPASSWORD_HIDDEN:$ curl -u "admin:PASSWORD_HIDDEN" http://localhost:9001/admin/ <!doctype html> <html> <head> <title>Admin Dashboard - Etherpad</title> [...] </html> -
the good news is that the breakage is not stored in the database: after a server restart users are able to authenticate again (only once):
$ curl -u "admin:pwd" http://localhost:9001/admin/ <!doctype html> <html> <head> <title>Admin Dashboard - Etherpad</title> [...] </html>
confirmed tnx @muxator will look at this now.
btw @muxator I'm not sure on the best way to fix this, afaik I read you were taking a look into it?