Passkey not removed from Logs

I noticed that the logic for removing passkeys from URL’s seems to be a bit off in some cases. For example this is how Sonarr parses the following URL (where 123456 is example torrentID and 12345678900000000abc is example passkey) -

Original URL - https://wwww.torrentleech.org/rss/download/123456/12345678900000000abc/filename.torrent
Sonarr Log - https://wwww.torrentleech.org/<removed>/download/123456/12345678900000000abc/filename.torrent

This seems to be related to the regex in CleanseLogMessage -

new Regex(@"torrentleech\.org/(?<secret>[0-9a-z]+)", RegexOptions.Compiled | RegexOptions.IgnoreCase)

Not sure if this is just out of date, or there is a different format of URL that is built from RSS feeds (default is same as above) when using built-in Sonarr indexer. In my case, I’m manually fetching the URL and sending it to Sonarr via the API, which results in the URL format above.

Sounds like they changed the format.

Sorry just realized length is probably important in my example link (for passkey/torrent ID), after checking the issue you linked.

Updated to a more accurate example in post above. Passkey seems to be 20 character hex.

Another update, just figured out what that current regex is for, it isn’t out of date. It is used for removing passkey from actual RSS endpoint itself (where 12345678900000000abc is passkey) -

http://rss.torrentleech.org/12345678900000000abc

So, it seems like that Regex is fine, there just needs to be an additional (new) one for .torrent download links in the RSS data.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.