mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Legacy code was deprecated on May 30, 2018
e73ae99e38
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user