From 556f0ea54bb31227cc82253aad219f35e8a65e96 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Mon, 7 Apr 2025 15:54:06 +0300 Subject: [PATCH] Fixed: Disallow tags creation with empty label --- src/Lidarr.Api.V1/Tags/TagController.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Lidarr.Api.V1/Tags/TagController.cs b/src/Lidarr.Api.V1/Tags/TagController.cs index a0e76335e..14f1aef64 100644 --- a/src/Lidarr.Api.V1/Tags/TagController.cs +++ b/src/Lidarr.Api.V1/Tags/TagController.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using FluentValidation; using Lidarr.Http; using Lidarr.Http.REST; using Lidarr.Http.REST.Attributes; @@ -23,6 +24,8 @@ namespace Lidarr.Api.V1.Tags : base(signalRBroadcaster) { _tagService = tagService; + + SharedValidator.RuleFor(c => c.Label).NotEmpty(); } public override TagResource GetResourceById(int id)