mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-08-04 15:28:23 +00:00
Fixed invalid username handling
This commit is contained in:
parent
96a5dda9ff
commit
6231fc18ea
1 changed files with 7 additions and 7 deletions
|
|
@ -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)
|
||||
{
|
||||
user = await _userManager.AuthenticateUser(
|
||||
|
|
@ -1403,13 +1410,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…
Add table
Add a link
Reference in a new issue