aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/UserController.cs
diff options
context:
space:
mode:
authorClaus Vium <cvium@users.noreply.github.com>2023-02-02 15:25:48 +0100
committerGitHub <noreply@github.com>2023-02-02 07:25:48 -0700
commite79f5d8226a0b1f9857671c04541ab936137d5b6 (patch)
tree08ae1fb0c081607d6485678f8b0f638b8adc842d /Jellyfin.Api/Controllers/UserController.cs
parent29c1f54b572ceb1a09be7744f4ab2fbb5224a8a7 (diff)
fix: require current password when admin changes their own password (#9238)
Fixes https://github.com/jellyfin/jellyfin/issues/9208
Diffstat (limited to 'Jellyfin.Api/Controllers/UserController.cs')
-rw-r--r--Jellyfin.Api/Controllers/UserController.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Jellyfin.Api/Controllers/UserController.cs b/Jellyfin.Api/Controllers/UserController.cs
index 568224a42..06f2227b8 100644
--- a/Jellyfin.Api/Controllers/UserController.cs
+++ b/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,