UrlChecker icon indicating copy to clipboard operation
UrlChecker copied to clipboard

Url Cleaner module crash

Open Murilogs1910 opened this issue 2 years ago • 1 comments

Steps to reproduce

  1. Install the testing apk from the latest PR (as this behaviour doesn't occur in 2.11)
  2. Open the advanced editor for the Url Cleaner module and add the code below to the beginning (right after the first "{", actually): "custom": {"decode": {"urlPattern": ".*","redirections": ["^https?:\/\/.*\/.*\\?.*url=(.*)"]}},
  3. Open Url Check with the following Url: https://example.com/?url=https://www.google.com/%

Expected behavior

Just like in 2.11, it should just not be able to apply the fix (tbh, I think I should be able to, but I guess that's because the module expects the "%" sign to be used just for encoding stuff in the url. That doesn't really bother me tho.)

Actual behavior

It crashes.

URLCheck version

evaluation

Android version

Android 11

Android Custom/Specific ROM or Device

One UI

Other details

You might want to change the title, maybe.

TL;DR: Don't know which commit caused this, and I believe this issue is of a really low priority.

Don't know after which commit this started happening, but it isn't happening in the latest released version.

I'm not sure if someone would actually run into this crash (although it probably happens with some other patterns) since [I think] most people don't even edit the Url Cleaner catalog. Also because I just ran into it by manually editing the url while testing a pattern with the new decode entry, not by opening a real url. Still, a crash is a crash.

I know I can avoid that by modifying the urlPattern, or just using a pattern in the Pattern Checker with the 'decode' entry, but it still shouldn't crash.

Acknowledgements

  • [X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
  • [X] I have written a short but informative title.
  • [X] I will fill out all of the requested information in this form.

Murilogs1910 avatar Jun 26 '23 04:06 Murilogs1910

Can confirm, the % is not a valid ending character (it is used for encoded characters, like "%20"). In any case, it should not break, and it may also happen in other modules! Should be an easy fix, but it need to touch a couple things.

Btw, the reason it doesn't crash in the standard version is that it is silently ignored! When an unexpected exception happens, I have special code to catch it. If the version installed is a debug one (like the evaluation) it is thrown (so the developer can fix it), but if it's the release one it is ignored (and hope for it to not break anything else)

TrianguloY avatar Jun 27 '23 16:06 TrianguloY