mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-05-11 07:06:26 +02:00
SessionStore: replace password with PASSWORD_HIDDEN when storing in db
Fixes #3421.
This commit is contained in:
parent
3e8b426847
commit
53f126082a
@ -38,6 +38,11 @@ SessionStore.prototype.get = function(sid, fn) {
|
||||
SessionStore.prototype.set = function(sid, sess, fn) {
|
||||
messageLogger.debug('SET ' + sid);
|
||||
|
||||
// don't store passwords in DB
|
||||
if (sess.user && sess.user.password) {
|
||||
sess.user.password = "PASSWORD_HIDDEN";
|
||||
}
|
||||
|
||||
db.set("sessionstorage:" + sid, sess);
|
||||
if (fn) {
|
||||
process.nextTick(fn);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user