From b2c149bf8f4429a30741ac26d2ae18580d71c454 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Fri, 30 Sep 2022 01:02:24 -0400 Subject: [PATCH] Fix system users being able to "change" their PW --- src/Tgstation.Server.Host/Controllers/UserController.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Tgstation.Server.Host/Controllers/UserController.cs b/src/Tgstation.Server.Host/Controllers/UserController.cs index f877cf0bc0..790dce133b 100644 --- a/src/Tgstation.Server.Host/Controllers/UserController.cs +++ b/src/Tgstation.Server.Host/Controllers/UserController.cs @@ -221,6 +221,9 @@ namespace Tgstation.Server.Host.Controllers if (model.Password != null) { + if (model.SystemIdentifier != null) + return BadRequest(new ErrorMessageResponse(ErrorCode.UserMismatchPasswordSid)); + var result = TrySetPassword(originalUser, model.Password, false); if (result != null) return result;