mirror of
https://github.com/Alvin-Zilverstand/nginx-proxy-manager.git
synced 2026-11-25 15:43:14 +01:00
Merge pull request #5508 from Zoey2936/fix-5441
Fix bug that allowed any authenticated user to modify their own roles field through the PUT
This commit is contained in:
1 file changed
+7
-1
@@ -87,7 +87,13 @@ const internalUser = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return access
|
return access
|
||||||
.can("users:update", data.id)
|
.can("users:permissions", data.id)
|
||||||
|
.catch(() => {
|
||||||
|
delete data.roles;
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
return access.can("users:update", data.id);
|
||||||
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
// Make sure that the user being updated doesn't change their email to another user that is already using it
|
// Make sure that the user being updated doesn't change their email to another user that is already using it
|
||||||
// 1. get user we want to update
|
// 1. get user we want to update
|
||||||
|
|||||||
Reference in new issue
Block a user