etherpad-lite icon indicating copy to clipboard operation
etherpad-lite copied to clipboard

plain text password in the database

Open ukcb opened this issue 8 years ago • 10 comments

I can see my admin password in plain text in the database.

sessionstorage:-FWbiguBVxp1_VWLERNNheogwak9aewi {"cookie":
{"path":"/","_expires":null,"originalMaxAge":null,"httpOnly":true,"secure":false},
"passport":{},"user":{"password":"Here is a plain text password!",
"is_admin":true,"username":"admin"}}

That must not happen!

v1.6.6

ukcb avatar Jul 10 '18 11:07 ukcb

Steps to replicate

  1. Uncomment password section
  2. Visit /admin
  3. Cat var/dirty.db | grep YOURPASS

JohnMcLear avatar Mar 29 '20 09:03 JohnMcLear

PR in to fix. https://github.com/ether/etherpad-lite/pull/3782

JohnMcLear avatar Mar 29 '20 09:03 JohnMcLear

Hi, the 5c5b99f commit makes etherpad not usable (at least with the Docker version) :

  • at first login, the admin password is the one one's set it up from Docker variables environment
  • but then the login is changed to "PASSWORD_HIDDEN" I'm not sure it only concerns Docker versions but this is a HUGE problem.

Using etherpad/etherpad (1.8.4) with postgresQL DB. From Docker. But I tried modifying the password directly in settings.json => same issue (first login OK, second > PASSWORD_HIDDEN) so I'm not sure it is 100% Docker related.

Edit : I confirm that when I remove the code added by @JohnMcLear on file src/node/db/SessionStore.js from lines 40 to 45 the password is now kept between sessions.

alasserr avatar May 15 '20 15:05 alasserr

Weird. I'm not sure how doesn't affect non docker deployed versions tho?

JohnMcLear avatar May 15 '20 17:05 JohnMcLear

I can't even get the password prompt. I changed password and I'm not re-prompted..

jose@server:~/develop$ cat settings.json | grep pass | grep derp
      "password": "derp",

What are you doing to get the re-prompt?

I went through every step and maybe it's related to just setting the password through the password environment variable? If you set the password with settings.json are things okay? I'm not suggestion you should I'm just trying to isolate the cause / scope of impact.

JohnMcLear avatar May 15 '20 23:05 JohnMcLear

The bug reported by @alasser is confirmed and it's not related to Docker. I should have been more thorough in https://github.com/ether/etherpad-lite/pull/3782#issuecomment-605730825, sorry.

Let's move the discussion on #4016.

muxator avatar May 16 '20 00:05 muxator

This issue should be repoened (the fix that closed this issue was reverted).

rhansen avatar May 17 '20 14:05 rhansen

@rhansen can you think of a way to solve this issue? It's one of the most critical for 1.9

JohnMcLear avatar Oct 24 '20 15:10 JohnMcLear

@JohnMcLear Wasn't this fixed by #4178?

rhansen avatar Oct 25 '20 00:10 rhansen

Oh, this is different.

Hmm... I think we can store a shallow copy of the settings.users[username] object as req.session.user and remove the password field from that copy. I'll toss together a PR.

rhansen avatar Oct 25 '20 00:10 rhansen