diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-02-14 14:36:40 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-02-14 14:36:40 -0500 |
| commit | 10cfb3c43c06e39b61929fea1d398801e555274b (patch) | |
| tree | 2930fc28602278330bd58cdc87c5c6961af6492d /MediaBrowser.Server.Implementations/Library/UserManager.cs | |
| parent | cfa2e5ed1de32f6f786afd036e7a13ed04c8f009 (diff) | |
sync updates
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/UserManager.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Library/UserManager.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/UserManager.cs b/MediaBrowser.Server.Implementations/Library/UserManager.cs index 8858abc10..59fecc857 100644 --- a/MediaBrowser.Server.Implementations/Library/UserManager.cs +++ b/MediaBrowser.Server.Implementations/Library/UserManager.cs @@ -402,15 +402,17 @@ namespace MediaBrowser.Server.Implementations.Library return dto; } - public UserDto GetOfflineUserDto(User user, string deviceId) + public UserDto GetOfflineUserDto(User user) { var dto = GetUserDto(user); var offlinePasswordHash = GetLocalPasswordHash(user); dto.HasPassword = !IsPasswordEmpty(offlinePasswordHash); + dto.OfflinePasswordSalt = Guid.NewGuid().ToString("N"); + // Hash the pin with the device Id to create a unique result for this device - dto.OfflinePassword = GetSha1String((offlinePasswordHash + deviceId).ToLower()); + dto.OfflinePassword = GetSha1String((offlinePasswordHash + dto.OfflinePasswordSalt).ToLower()); dto.ServerName = _appHost.FriendlyName; |
