mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-03-10 22:20:29 +01:00
Merge pull request #575 from pgrodrigues/0.4.0
Abstract the local strategy login error to thwart hackers
This commit is contained in:
@@ -20,14 +20,9 @@ module.exports = function() {
|
||||
if (err) {
|
||||
return done(err);
|
||||
}
|
||||
if (!user) {
|
||||
if (!user || !user.authenticate(password)) {
|
||||
return done(null, false, {
|
||||
message: 'Unknown user'
|
||||
});
|
||||
}
|
||||
if (!user.authenticate(password)) {
|
||||
return done(null, false, {
|
||||
message: 'Invalid password'
|
||||
message: 'Invalid username or password'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user