From 9c9fec70d886866a7a60d91782050556242f4011 Mon Sep 17 00:00:00 2001 From: Qstick Date: Thu, 13 Sep 2018 22:29:28 -0400 Subject: [PATCH] Fixed: Validation for IndexerId on Release API Endpoint Co-Authored-By: Mark McDowall --- src/Lidarr.Api.V1/Indexers/ReleaseModule.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Lidarr.Api.V1/Indexers/ReleaseModule.cs b/src/Lidarr.Api.V1/Indexers/ReleaseModule.cs index 7583fc00f..df6456c86 100644 --- a/src/Lidarr.Api.V1/Indexers/ReleaseModule.cs +++ b/src/Lidarr.Api.V1/Indexers/ReleaseModule.cs @@ -11,6 +11,7 @@ using NzbDrone.Core.Exceptions; using NzbDrone.Core.Indexers; using NzbDrone.Core.IndexerSearch; using NzbDrone.Core.Parser.Model; +using NzbDrone.Core.Validation; using Lidarr.Http.Extensions; using HttpStatusCode = System.Net.HttpStatusCode; @@ -46,6 +47,7 @@ namespace Lidarr.Api.V1.Indexers Post["/"] = x => DownloadRelease(this.Bind()); PostValidator.RuleFor(s => s.DownloadAllowed).Equal(true); + PostValidator.RuleFor(s => s.IndexerId).ValidId(); PostValidator.RuleFor(s => s.Guid).NotEmpty(); _remoteAlbumCache = cacheManager.GetCache(GetType(), "remoteAlbums");