Browse Source

fix: require current password when admin changes their own password (#9238)

Fixes https://github.com/jellyfin/jellyfin/issues/9208
Claus Vium 2 năm trước cách đây
mục cha
commit
e79f5d8226
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      Jellyfin.Api/Controllers/UserController.cs

+ 1 - 1
Jellyfin.Api/Controllers/UserController.cs

@@ -277,7 +277,7 @@ namespace Jellyfin.Api.Controllers
             }
             else
             {
-                if (!User.IsInRole(UserRoles.Administrator))
+                if (!User.IsInRole(UserRoles.Administrator) || User.GetUserId().Equals(userId))
                 {
                     var success = await _userManager.AuthenticateUser(
                         user.Username,