1
0
Fork 0
mirror of https://github.com/Jackett/Jackett synced 2024-12-26 09:48:37 +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)
{
// 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;
}
@ -223,7 +223,12 @@ namespace Jackett.Common.Indexers
}
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
{
@ -234,11 +239,13 @@ namespace Jackett.Common.Indexers
SaveConfig();
IsConfigured = true;
logger.Info($"Password successfully migrated for {ID}");
return true;
}
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);
}
}
}