Fixed invalid username handling
This commit is contained in:
parent
96a5dda9ff
commit
6231fc18ea
|
@ -1393,6 +1393,13 @@ 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)
|
if (enforcePassword)
|
||||||
{
|
{
|
||||||
user = await _userManager.AuthenticateUser(
|
user = await _userManager.AuthenticateUser(
|
||||||
|
@ -1403,13 +1410,6 @@ namespace Emby.Server.Implementations.Session
|
||||||
true).ConfigureAwait(false);
|
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 token = GetAuthorizationToken(user, request.DeviceId, request.App, request.AppVersion, request.DeviceName);
|
||||||
|
|
||||||
var session = LogSessionActivity(
|
var session = LogSessionActivity(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user