aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/StartupController.cs
diff options
context:
space:
mode:
authorcvium <clausvium@gmail.com>2023-05-26 21:50:51 +0200
committercvium <clausvium@gmail.com>2023-05-26 21:50:51 +0200
commit29ef02af9a1c2f2ff51b5cd34a9074943cdc1d1f (patch)
tree4b0e4fe9693d81abaaa2235a435861fdea835979 /Jellyfin.Api/Controllers/StartupController.cs
parent57d8452e2a093c733d25d662e72f43a4c4c55eea (diff)
do not allow empty admin password during wizard
Diffstat (limited to 'Jellyfin.Api/Controllers/StartupController.cs')
-rw-r--r--Jellyfin.Api/Controllers/StartupController.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Jellyfin.Api/Controllers/StartupController.cs b/Jellyfin.Api/Controllers/StartupController.cs
index aab390d1f..1098733b2 100644
--- a/Jellyfin.Api/Controllers/StartupController.cs
+++ b/Jellyfin.Api/Controllers/StartupController.cs
@@ -131,6 +131,10 @@ public class StartupController : BaseJellyfinApiController
public async Task<ActionResult> UpdateStartupUser([FromBody] StartupUserDto startupUserDto)
{
var user = _userManager.Users.First();
+ if (string.IsNullOrWhiteSpace(startupUserDto.Password))
+ {
+ return BadRequest("Password must not be empty");
+ }
if (startupUserDto.Name is not null)
{