The Free Software Media System - Server Backend & API
Revert #2146 ordering change
Joshua M. Bonifacec3562664196c
diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.csindex dfcd3843c7..de768333d8 100644--- a/Emby.Server.Implementations/Session/SessionManager.cs+++ b/Emby.Server.Implementations/Session/SessionManager.cs@@ -1401,6 +1401,16 @@ namespace Emby.Server.Implementations.Sessionuser = _userManager.GetUserByName(request.Username);}+ if (enforcePassword)+ {+ user = await _userManager.AuthenticateUser(+ request.Username,+ request.Password,+ request.PasswordSha1,+ request.RemoteEndPoint,+ true).ConfigureAwait(false);+ }+if (user == null){AuthenticationFailed?.Invoke(this, new GenericEventArgs<AuthenticationRequest>(request));@@ -1413,16 +1423,6 @@ namespace Emby.Server.Implementations.Sessionthrow new SecurityException("User is not allowed access from this device.");}- if (enforcePassword)- {- user = await _userManager.AuthenticateUser(- request.Username,- request.Password,- request.PasswordSha1,- request.RemoteEndPoint,- true).ConfigureAwait(false);- }-var token = GetAuthorizationToken(user, request.DeviceId, request.App, request.AppVersion, request.DeviceName);var session = LogSessionActivity(