소스 검색

Merge pull request #6822 from NickSica/master

Cody Robibero 3 년 전
부모
커밋
8868b34d78
1개의 변경된 파일15개의 추가작업 그리고 3개의 파일을 삭제
  1. 15 3
      Jellyfin.Server.Implementations/Security/AuthorizationContext.cs

+ 15 - 3
Jellyfin.Server.Implementations/Security/AuthorizationContext.cs

@@ -185,9 +185,21 @@ namespace Jellyfin.Server.Implementations.Security
                     authInfo.IsAuthenticated = true;
                     authInfo.Client = key.Name;
                     authInfo.Token = key.AccessToken;
-                    authInfo.DeviceId = string.Empty;
-                    authInfo.Device = string.Empty;
-                    authInfo.Version = string.Empty;
+                    if (string.IsNullOrWhiteSpace(authInfo.DeviceId))
+                    {
+                        authInfo.DeviceId = string.Empty;
+                    }
+
+                    if (string.IsNullOrWhiteSpace(authInfo.Device))
+                    {
+                        authInfo.Device = string.Empty;
+                    }
+
+                    if (string.IsNullOrWhiteSpace(authInfo.Version))
+                    {
+                        authInfo.Version = string.Empty;
+                    }
+
                     authInfo.IsApiKey = true;
                 }
             }