mirror of
https://github.com/Jackett/Jackett
synced 2024-12-25 09:20:37 +00:00
ProtectionService: fix empty password handling
This commit is contained in:
parent
099adadbdc
commit
8de0b0cbad
1 changed files with 6 additions and 0 deletions
|
@ -42,11 +42,17 @@ namespace Jackett.Server.Services
|
||||||
|
|
||||||
public string Protect(string plainText)
|
public string Protect(string plainText)
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrEmpty(plainText))
|
||||||
|
return string.Empty;
|
||||||
|
|
||||||
return _protector.Protect(plainText);
|
return _protector.Protect(plainText);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string UnProtect(string plainText)
|
public string UnProtect(string plainText)
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrEmpty(plainText))
|
||||||
|
return string.Empty;
|
||||||
|
|
||||||
return _protector.Unprotect(plainText);
|
return _protector.Unprotect(plainText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue