1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-17 21:26:13 -04:00

Compare commits

..

1 Commits

Author SHA1 Message Date
Mark McDowall
657c5428d6 Don't log debug messages for API key validation
Closes #7934
2025-06-29 21:40:55 -07:00
7 changed files with 8 additions and 7 deletions

View File

@@ -215,6 +215,7 @@ namespace NzbDrone.Common.Instrumentation
c.ForLogger("Microsoft.*").WriteToNil(LogLevel.Warn);
c.ForLogger("Microsoft.Hosting.Lifetime*").WriteToNil(LogLevel.Info);
c.ForLogger("Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware").WriteToNil(LogLevel.Fatal);
c.ForLogger("Sonarr.Http.Authentication.ApiKeyAuthenticationHandler").WriteToNil(LogLevel.Info);
});
}

View File

@@ -221,7 +221,7 @@ namespace NzbDrone.Core.Download
try
{
hash = MagnetLink.Parse(magnetUrl).InfoHashes.V1OrV2.ToHex();
hash = MagnetLink.Parse(magnetUrl).InfoHash.ToHex();
}
catch (FormatException ex)
{

View File

@@ -82,7 +82,7 @@ namespace NzbDrone.Core.Indexers
{
try
{
return MagnetLink.Parse(magnetUrl).InfoHashes.V1OrV2.ToHex();
return MagnetLink.Parse(magnetUrl).InfoHash.ToHex();
}
catch
{

View File

@@ -22,7 +22,7 @@ namespace NzbDrone.Core.MediaFiles.TorrentInfo
{
try
{
return Torrent.Load(fileContents).InfoHashes.V1OrV2.ToHex();
return Torrent.Load(fileContents).InfoHash.ToHex();
}
catch
{

View File

@@ -27,7 +27,7 @@
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.7" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLog" Version="5.3.4" />
<PackageReference Include="MonoTorrent" Version="3.0.2" />
<PackageReference Include="MonoTorrent" Version="2.0.7" />
<PackageReference Include="System.Data.SQLite.Core.Servarr" Version="1.0.115.5-18" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
<PackageReference Include="Npgsql" Version="9.0.3" />

View File

@@ -54,7 +54,7 @@ namespace NzbDrone.Host
b.ClearProviders();
b.SetMinimumLevel(LogLevel.Trace);
b.AddFilter("Microsoft.AspNetCore", LogLevel.Warning);
b.AddFilter("Sonarr.Http.Authentication", LogLevel.Information);
b.AddFilter("Sonarr.Http.Authentication.ApiKeyAuthenticationHandler", LogLevel.Information);
b.AddFilter("Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager", LogLevel.Error);
b.AddNLog();
});

View File

@@ -8,7 +8,7 @@ namespace NzbDrone.Http.Authentication
{
public class UiAuthorizationPolicyProvider : IAuthorizationPolicyProvider
{
private const string POLICY_NAME = "UI";
private const string PolicyName = "UI";
private readonly IConfigFileProvider _config;
public DefaultAuthorizationPolicyProvider FallbackPolicyProvider { get; }
@@ -26,7 +26,7 @@ namespace NzbDrone.Http.Authentication
public Task<AuthorizationPolicy> GetPolicyAsync(string policyName)
{
if (policyName.Equals(POLICY_NAME, StringComparison.OrdinalIgnoreCase))
if (policyName.Equals(PolicyName, StringComparison.OrdinalIgnoreCase))
{
var policy = new AuthorizationPolicyBuilder(_config.AuthenticationMethod.ToString())
.AddRequirements(new BypassableDenyAnonymousAuthorizationRequirement());