mirror of
https://github.com/Mailu/Mailu.git
synced 2025-06-06 23:36:26 +02:00
master uses SSO
This commit is contained in:
parent
82e0951e59
commit
eb110c8431
@ -50,7 +50,7 @@ def check_credentials(user, password, ip, protocol=None, auth_port=None, source_
|
|||||||
app.logger.info(f'Login attempt for: {user}/{protocol}/{auth_port} from: {ip}/{source_port}: failed: badip: token-{token.id}: {token.comment or ""!r}')
|
app.logger.info(f'Login attempt for: {user}/{protocol}/{auth_port} from: {ip}/{source_port}: failed: badip: token-{token.id}: {token.comment or ""!r}')
|
||||||
return False # we can return directly here since the token is valid
|
return False # we can return directly here since the token is valid
|
||||||
if user.check_password(password):
|
if user.check_password(password):
|
||||||
if app.config['AUTH_REQUIRE_TOKENS'] and protocol != 'web':
|
if app.config['AUTH_REQUIRE_TOKENS'] and not protocol in ['web', 'sso']:
|
||||||
app.logger.info(f'Login attempt for: {user}/{protocol}/{auth_port} from: {ip}/{source_port}: failed: password ok, but a token is required')
|
app.logger.info(f'Login attempt for: {user}/{protocol}/{auth_port} from: {ip}/{source_port}: failed: password ok, but a token is required')
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user