1
0
Fork 0
mirror of https://github.com/Jackett/Jackett synced 2024-12-27 18:29:47 +00:00

Update migration logging

This commit is contained in:
flightlevel 2018-06-10 12:51:34 +10:00
parent 28ed7cc8a5
commit e8bc2816ef

View file

@ -193,7 +193,7 @@ namespace Jackett.Common.Indexers
if (!isWindows && dotNetVersion.Major < 4) if (!isWindows && dotNetVersion.Major < 4)
{ {
// User isn't running Windows, but is running on .NET Core framewrok, no access to the DPAPI, so don't bother trying to migrate // User isn't running Windows, but is running on .NET Core framework, no access to the DPAPI, so don't bother trying to migrate
return false; return false;
} }
@ -223,7 +223,12 @@ namespace Jackett.Common.Indexers
} }
catch (Exception ex) catch (Exception ex)
{ {
logger.Info("Password could not be unprotected using Microsoft.AspNetCore.DataProtection, trying legacy: " + ex.ToString()); if (ex.Message != "The provided payload cannot be decrypted because it was not protected with this protection provider.")
{
logger.Info($"Password could not be unprotected using Microsoft.AspNetCore.DataProtection - {ID} : " + ex);
}
logger.Info($"Attempting legacy Unprotect - {ID} : ");
try try
{ {
@ -234,11 +239,13 @@ namespace Jackett.Common.Indexers
SaveConfig(); SaveConfig();
IsConfigured = true; IsConfigured = true;
logger.Info($"Password successfully migrated for {ID}");
return true; return true;
} }
catch (Exception exception) catch (Exception exception)
{ {
logger.Info("Password could not be unprotected using legacy DPAPI: " + exception.ToString()); logger.Info($"Password could not be unprotected using legacy DPAPI - {ID} : " + exception);
} }
} }
} }