-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "fix!: api login should not suggest which credential is wrong" (…
- Loading branch information
Showing
6 changed files
with
26 additions
and
33 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
apps/meteor/app/lib/server/lib/loginErrorMessageOverride.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Do not disclose if user exists when password is invalid | ||
import { Accounts } from 'meteor/accounts-base'; | ||
import { Meteor } from 'meteor/meteor'; | ||
|
||
const { _runLoginHandlers } = Accounts; | ||
Accounts._runLoginHandlers = function (methodInvocation, options) { | ||
const result = _runLoginHandlers.call(Accounts, methodInvocation, options); | ||
|
||
if (result.error && result.error.reason === 'Incorrect password') { | ||
result.error = new Meteor.Error(403, 'User not found'); | ||
} | ||
|
||
return result; | ||
}; |
16 changes: 0 additions & 16 deletions
16
apps/meteor/app/lib/server/lib/loginErrorMessageOverride.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters