diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2020-05-26 19:57:24 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-26 19:57:24 -0400 |
| commit | b33fa06efa1c7bf334bc0bcf7e845d86dffe12da (patch) | |
| tree | 9b70050001a0da905de5018a4cfafe827021d89d /Emby.Server.Implementations/Library/UserManager.cs | |
| parent | 9c00226f11ee6d99e3e8f83a3a531e70d743e6ba (diff) | |
| parent | 0be3dfe7c53d8c3bb43c28ea02c8a594bcb903b2 (diff) | |
Merge pull request #3187 from jellyfin/revert-2492-fix-api-private-data-leak
Revert "Fix emby/user/public API leaking sensitive data"
Diffstat (limited to 'Emby.Server.Implementations/Library/UserManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Library/UserManager.cs | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/Emby.Server.Implementations/Library/UserManager.cs b/Emby.Server.Implementations/Library/UserManager.cs index b8feb5535..d63bc6bda 100644 --- a/Emby.Server.Implementations/Library/UserManager.cs +++ b/Emby.Server.Implementations/Library/UserManager.cs @@ -608,31 +608,6 @@ namespace Emby.Server.Implementations.Library return dto; } - public PublicUserDto GetPublicUserDto(User user, string remoteEndPoint = null) - { - if (user == null) - { - throw new ArgumentNullException(nameof(user)); - } - - IAuthenticationProvider authenticationProvider = GetAuthenticationProvider(user); - bool hasConfiguredPassword = authenticationProvider.HasPassword(user); - bool hasConfiguredEasyPassword = !string.IsNullOrEmpty(authenticationProvider.GetEasyPasswordHash(user)); - - bool hasPassword = user.Configuration.EnableLocalPassword && - !string.IsNullOrEmpty(remoteEndPoint) && - _networkManager.IsInLocalNetwork(remoteEndPoint) ? hasConfiguredEasyPassword : hasConfiguredPassword; - - PublicUserDto dto = new PublicUserDto - { - Name = user.Name, - HasPassword = hasPassword, - HasConfiguredPassword = hasConfiguredPassword, - }; - - return dto; - } - public UserDto GetOfflineUserDto(User user) { var dto = GetUserDto(user); |
