From 61d1c02961c5cbad69ab83fcd23e5737318766e3 Mon Sep 17 00:00:00 2001 From: kaso17 Date: Tue, 2 Jan 2018 20:08:37 +0100 Subject: [PATCH] fix password resetting --- src/Jackett/Controllers/ServerConfigurationController.cs | 2 +- src/Jackett/Services/SecuityService.cs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Jackett/Controllers/ServerConfigurationController.cs b/src/Jackett/Controllers/ServerConfigurationController.cs index b03e9861a..1f9ef1c38 100644 --- a/src/Jackett/Controllers/ServerConfigurationController.cs +++ b/src/Jackett/Controllers/ServerConfigurationController.cs @@ -47,7 +47,7 @@ namespace Jackett.Controllers.V20 { var oldPassword = serverConfig.AdminPassword; if (string.IsNullOrEmpty(password)) - password = string.Empty; + password = null; if (oldPassword != password) { diff --git a/src/Jackett/Services/SecuityService.cs b/src/Jackett/Services/SecuityService.cs index fefe88ab1..5d52ae456 100644 --- a/src/Jackett/Services/SecuityService.cs +++ b/src/Jackett/Services/SecuityService.cs @@ -24,6 +24,8 @@ namespace Jackett.Services public string HashPassword(string input) { + if (input == null) + return null; // Append key as salt input += _serverConfig.APIKey;