diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-07-11 00:27:46 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-07-11 00:27:46 -0400 |
| commit | 59de5c0d14fbf0c09926e37dce0c2e6de69000dd (patch) | |
| tree | 74a654e937684f156f5c92e0c20f94c0a8d165bd /MediaBrowser.Server.Implementations/Session/SessionManager.cs | |
| parent | 3cfd765cb4a875ff65acf74826533ba1a804b34a (diff) | |
update translations
Diffstat (limited to 'MediaBrowser.Server.Implementations/Session/SessionManager.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Session/SessionManager.cs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/MediaBrowser.Server.Implementations/Session/SessionManager.cs index c3d24c0de..338bf8959 100644 --- a/MediaBrowser.Server.Implementations/Session/SessionManager.cs +++ b/MediaBrowser.Server.Implementations/Session/SessionManager.cs @@ -1210,9 +1210,16 @@ namespace MediaBrowser.Server.Implementations.Session /// <returns>Task{SessionInfo}.</returns> /// <exception cref="System.UnauthorizedAccessException">Invalid user or password entered.</exception> /// <exception cref="UnauthorizedAccessException"></exception> - public async Task<AuthenticationResult> AuthenticateNewSession(string username, string password, string clientType, string appVersion, string deviceId, string deviceName, string remoteEndPoint) + public async Task<AuthenticationResult> AuthenticateNewSession(string username, + string password, + string clientType, + string appVersion, + string deviceId, + string deviceName, + string remoteEndPoint) { - var result = IsLocalhost(remoteEndPoint) || await _userManager.AuthenticateUser(username, password).ConfigureAwait(false); + var result = (IsLocalhost(remoteEndPoint) && string.Equals(clientType, "Dashboard", StringComparison.OrdinalIgnoreCase)) || + await _userManager.AuthenticateUser(username, password).ConfigureAwait(false); if (!result) { @@ -1337,7 +1344,7 @@ namespace MediaBrowser.Server.Implementations.Session remoteEndpoint.StartsWith("::", StringComparison.OrdinalIgnoreCase); } - public bool IsLocal(string remoteEndpoint) + public bool IsInLocalNetwork(string remoteEndpoint) { if (string.IsNullOrWhiteSpace(remoteEndpoint)) { |
