core: Fix cache collision for non ASCII characters (#12517)

This commit is contained in:
Sen Jiang
2021-11-07 20:40:07 -08:00
committed by GitHub
parent 6b3238e2dd
commit 9147549e2f

View File

@@ -241,7 +241,7 @@ namespace Jackett.Common.Services
{ {
var json = GetSerializedQuery(query); var json = GetSerializedQuery(query);
// Compute the hash // Compute the hash
return BitConverter.ToString(_sha256.ComputeHash(Encoding.ASCII.GetBytes(json))); return BitConverter.ToString(_sha256.ComputeHash(Encoding.UTF8.GetBytes(json)));
} }
private static string GetSerializedQuery(TorznabQuery query) private static string GetSerializedQuery(TorznabQuery query)