core: remove legacy cryptographic code. #10433 (#10477)

Legacy code was deprecated on May 30, 2018
e73ae99e38
This commit is contained in:
Diego Heras
2020-12-12 01:09:52 +01:00
committed by GitHub
parent ce4b99394e
commit 0e12f35082
3 changed files with 6 additions and 196 deletions

View File

@@ -220,29 +220,7 @@ namespace Jackett.Common.Indexers
catch (Exception ex)
{
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
{
var unprotectedPassword = protectionService.LegacyUnProtect(passwordValue);
//Password successfully unprotected using Windows/Mono DPAPI
passwordPropertyValue.Value = unprotectedPassword;
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 - {Id} : " + exception);
}
}
}