mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure that a valid error message should be displayed for an incorrect user or password.
This commit is contained in:
@@ -314,6 +314,11 @@ def create_app(app_name=None):
|
||||
getattr(config, 'SQLITE_TIMEOUT', 500)
|
||||
)
|
||||
|
||||
# Override USER_DOES_NOT_EXIST and INVALID_PASSWORD messages from flask.
|
||||
app.config['SECURITY_MSG_USER_DOES_NOT_EXIST'] = \
|
||||
app.config['SECURITY_MSG_INVALID_PASSWORD'] = \
|
||||
(gettext("Incorrect username or password."), "error")
|
||||
|
||||
# Create database connection object and mailer
|
||||
db.init_app(app)
|
||||
|
||||
|
@@ -23,7 +23,7 @@ from pgadmin.model import User
|
||||
class BaseAuthentication(object):
|
||||
|
||||
DEFAULT_MSG = {
|
||||
'USER_DOES_NOT_EXIST': 'Specified user does not exist',
|
||||
'USER_DOES_NOT_EXIST': 'Incorrect username or password.',
|
||||
'LOGIN_FAILED': 'Login failed',
|
||||
'EMAIL_NOT_PROVIDED': 'Email/Username not provided',
|
||||
'PASSWORD_NOT_PROVIDED': 'Password not provided'
|
||||
|
Reference in New Issue
Block a user