core: cleanse sharewood passkey

This commit is contained in:
Bogdan
2024-10-09 00:22:23 +03:00
parent 81ccf8d828
commit 5b387e7c27
2 changed files with 2 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ namespace Jackett.Common.Utils.Logging
new Regex(@"(?<=authkey = "")(?<secret>[^&=]+?)(?="")", RegexOptions.Compiled | RegexOptions.IgnoreCase),
new Regex(@"(?<=beyond-hd\.[a-z]+/api/torrents/)(?<secret>[^&=][a-z0-9]+)", RegexOptions.Compiled | RegexOptions.IgnoreCase),
new Regex(@"(?<=beyond-hd\.[a-z]+/torrent/download/[\w\d-]+[.]\d+[.])(?<secret>[a-z0-9]+)", RegexOptions.Compiled | RegexOptions.IgnoreCase),
new Regex(@"(?:sharewood)\.[a-z]{2,3}/api/(?<secret>[a-z0-9]{16,})/", RegexOptions.Compiled | RegexOptions.IgnoreCase),
// UNIT3D
new Regex(@"(?<=[a-z0-9-]+\.[a-z]+/torrent/download/\d+\.)(?<secret>[^&=][a-z0-9]+)", RegexOptions.Compiled | RegexOptions.IgnoreCase),

View File

@@ -8,6 +8,7 @@ namespace Jackett.Test.Utils.Logging
public class CleanseLogMessageFixture
{
[TestCase(@"WebClient(HttpWebClient2).GetResultAsync(Method: POST Url: https://some-site.org/takelogin.php PostData: {username=mySecret, password=mySecret} RawBody: )")]
[TestCase(@"WebClient(HttpWebClient2).GetResultAsync(Method: GET Url: https://www.sharewood.tv/api/2b51db35e1910123321025a12b9933d2/last-torrents?)")]
public void should_clean_message(string message)
{
var cleansedMessage = CleanseLogMessage.Cleanse(message);