diff options
| author | dkanada <dkanada@users.noreply.github.com> | 2020-03-31 15:15:25 +0900 |
|---|---|---|
| committer | Joshua M. Boniface <joshua@boniface.me> | 2020-04-05 12:42:56 -0400 |
| commit | 54435a1243edd994dccfa7e78dc21e4fb8e5bfbc (patch) | |
| tree | 43701ce7b554f50f02da4366e9908e46771afea8 | |
| parent | 899be443885a7ab8fb496acd763183b978712af7 (diff) | |
Merge pull request #2712 from joshuaboniface/fix-ldap-issues
Revert #2146 ordering change
(cherry picked from commit 9e82e7c84733a0260d1d4038281d390dc37df419)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
| -rw-r--r-- | Emby.Server.Implementations/Session/SessionManager.cs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs index dfcd3843c..de768333d 100644 --- a/Emby.Server.Implementations/Session/SessionManager.cs +++ b/Emby.Server.Implementations/Session/SessionManager.cs @@ -1401,6 +1401,16 @@ namespace Emby.Server.Implementations.Session user = _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.Session throw 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( |
