diff options
| author | Mark Monteiro <marknr.monteiro@protonmail.com> | 2020-04-03 20:22:03 -0400 |
|---|---|---|
| committer | Mark Monteiro <marknr.monteiro@protonmail.com> | 2020-04-03 20:22:03 -0400 |
| commit | e0f40f57d81da7e45be4d991e3ed369f437bbf31 (patch) | |
| tree | e08dfcfdf1072ebdf1127247146305a7e90f97cd /Emby.Server.Implementations/Session | |
| parent | 0e195d2e49f4ee9979182603a356fdb7af8d98cf (diff) | |
| parent | a37b69a49387f32b47764bd9bfa49ca791c01014 (diff) | |
Merge remote-tracking branch 'upstream/master' into remove-common-process
Diffstat (limited to 'Emby.Server.Implementations/Session')
| -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( |
