Merge pull request #2146 from cromefire/patch-1
Fix invalid username handling
This commit is contained in:
commit
b8c61a5c40
|
@ -1389,6 +1389,12 @@ namespace Emby.Server.Implementations.Session
|
|||
}
|
||||
}
|
||||
|
||||
if (user == null)
|
||||
{
|
||||
AuthenticationFailed?.Invoke(this, new GenericEventArgs<AuthenticationRequest>(request));
|
||||
throw new SecurityException("Invalid user or password entered.");
|
||||
}
|
||||
|
||||
if (enforcePassword)
|
||||
{
|
||||
user = await _userManager.AuthenticateUser(
|
||||
|
@ -1399,13 +1405,6 @@ namespace Emby.Server.Implementations.Session
|
|||
true).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
if (user == null)
|
||||
{
|
||||
AuthenticationFailed?.Invoke(this, new GenericEventArgs<AuthenticationRequest>(request));
|
||||
|
||||
throw new SecurityException("Invalid user or password entered.");
|
||||
}
|
||||
|
||||
var token = GetAuthorizationToken(user, request.DeviceId, request.App, request.AppVersion, request.DeviceName);
|
||||
|
||||
var session = LogSessionActivity(
|
||||
|
|
Loading…
Reference in New Issue
Block a user