1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-24 22:36:19 -04:00

New: Don't return API Keys and Passwords via the API

This commit is contained in:
Mark McDowall
2022-05-23 20:41:50 -07:00
parent b154b00c61
commit 570be88215
10 changed files with 51 additions and 29 deletions
+2 -1
View File
@@ -92,7 +92,8 @@ namespace Sonarr.Api.V3
private TProviderDefinition GetDefinition(TProviderResource providerResource, bool validate, bool includeWarnings, bool forceValidate)
{
var definition = _resourceMapper.ToModel(providerResource);
var existingDefinition = providerResource.Id > 0 ? _providerFactory.Find(providerResource.Id) : null;
var definition = _resourceMapper.ToModel(providerResource, existingDefinition);
if (validate && (definition.Enable || forceValidate))
{