Merge pull request #10 from nashe/passwordcheck

be more strict on password check
pull/3366/head
John McLear 2018-03-24 11:07:37 +00:00 committed by GitHub
commit e2370436fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ exports.basicAuth = function (req, res, next) {
var username = userpass.shift(); var username = userpass.shift();
var password = userpass.join(':'); var password = userpass.join(':');
if (settings.users[username] != undefined && settings.users[username].password == password) { if (settings.users[username] != undefined && settings.users[username].password === password) {
settings.users[username].username = username; settings.users[username].username = username;
req.session.user = settings.users[username]; req.session.user = settings.users[username];
return cb(true); return cb(true);