Project

General

Profile

Bug #566

Updating Easylist.txt to latest available Crash PrivacyBrowser

Added by Giampiero Ammazzini 6 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Next Release
Start date:
05/08/2020
Due date:
% Done:

0%

Estimated time:

Description

I compiled the latest dev channel version of PrivacyBrowser, and taken the chance to update all the lists for ads blocking, updating Easylist.txt to latest version cause a crash of the browser on loading, I tried checking some diffs between the latest Easylist.txt that is of end March and this, but there are too many diffs, I suspect it has something to do with script.

History

#1

Updated by Soren Stoutner 6 months ago

  • Assignee set to Soren Stoutner
  • Priority changed from Critical Bug to Next Release

Can you provide the crash log? Also, what procedure did you use to update the list?

#2

Updated by Giampiero Ammazzini 6 months ago

05-11 13:36:57.393 D/AndroidRuntime( 4480): Shutting down VM
05-11 13:36:57.394 E/AndroidRuntime( 4480): FATAL EXCEPTION: main
05-11 13:36:57.394 E/AndroidRuntime( 4480): Process: com.stoutner.privacybrowser.standard, PID: 4480
05-11 13:36:57.394 E/AndroidRuntime( 4480): java.util.regex.PatternSyntaxException: Unrecognized backslash escape sequence in pattern near index 41
05-11 13:36:57.394 E/AndroidRuntime( 4480): /https?:\/\/.*.streamplay\.biz\/.*(\?|&|\
05-11 13:36:57.394 E/AndroidRuntime( 4480): ^
05-11 13:36:57.394 E/AndroidRuntime( 4480): at java.util.regex.Pattern.compileImpl(Native Method)
05-11 13:36:57.394 E/AndroidRuntime( 4480): at java.util.regex.Pattern.compile(Pattern.java:1433)
05-11 13:36:57.394 E/AndroidRuntime( 4480): at java.util.regex.Pattern.<init>(Pattern.java:1408)
05-11 13:36:57.394 E/AndroidRuntime( 4480): at java.util.regex.Pattern.compile(Pattern.java:966)
05-11 13:36:57.394 E/AndroidRuntime( 4480): at java.util.regex.Pattern.matches(Pattern.java:1074)
05-11 13:36:57.394 E/AndroidRuntime( 4480): at b.b.a.f.c.a(Unknown Source:4303)
05-11 13:36:57.394 E/AndroidRuntime( 4480): at com.stoutner.privacybrowser.activities.MainWebViewActivity$d.shouldInterceptRequest(Unknown Source:529)
05-11 13:36:57.394 E/AndroidRuntime( 4480): at android.webkit.WebViewClient.shouldInterceptRequest(WebViewClient.java:227)
05-11 13:36:57.394 E/AndroidRuntime( 4480): at ib.a(PG:15)
05-11 13:36:57.394 E/AndroidRuntime( 4480): at org.chromium.android_webview.AwContentsBackgroundThreadClient.shouldInterceptRequestFromNative(PG:2)
05-11 13:36:57.443 E/cr_AwBgThreadClient( 4480): Client raised exception in shouldInterceptRequest. Re-throwing on UI thread.
05-11 13:36:57.481 E/cr_AwBgThreadClient( 4480): Client raised exception in shouldInterceptRequest. Re-throwing on UI thread.
05-11 13:36:57.513 E/cr_AwBgThreadClient( 4480): Client raised exception in shouldInterceptRequest. Re-throwing on UI thread.
05-11 13:36:57.544 E/cr_AwBgThreadClient( 4480): Client raised exception in shouldInterceptRequest. Re-throwing on UI thread.
05-11 13:36:57.566 E/cr_AwBgThreadClient( 4480): Client raised exception in shouldInterceptRequest. Re-throwing on UI thread.
05-11 13:36:57.567 E/cr_AwBgThreadClient( 4480): Client raised exception in shouldInterceptRequest. Re-throwing on UI thread.

#3

Updated by Giampiero Ammazzini 6 months ago

There are two kind of these entries inside easylist.txt :

/^https?:\/\/.*powvideo\.net\/.*(\?|&|\$|=|&|!)/$script,subdocument
/^https?:\/\/.*.streamplay\.biz\/.*(\?|&|\$|=|&|!)/$script,subdocument

Trying now if removing them fix the crash.

#4

Updated by Giampiero Ammazzini 6 months ago

Browser doesn't crash anymore without those two entries, I think should be reported to easylist mantainers.

#5

Updated by Soren Stoutner 6 months ago

  • Status changed from New to Closed

Yes, it looks like those entries are not valid Regular Expressions, at least as Android understands them. You should probably report it to EasyList, although I would recommend you check to make sure they haven't already taken care of it before you do.

#6

Updated by Giampiero Ammazzini 6 months ago

Indeed, I asked them if they could provide an alternative syntax:

https://github.com/easylist/easylist/issues/5338

Thank you.

#7

Updated by Soren Stoutner 6 months ago

Looking at the error more closely, the problem is that the parser used by Privacy Browser is truncating the entry at the first `$`. Normally, EasyList uses a syntax where the `$` indicates the end of the URL and the beginning of the EasyList types. However, in the case of these two entries, the are two `$`, with the first one being part of the regular expression. Truncating at the first `$` causes the regular expression to be invalid, which causes the crash.

The easiest solution is to remove or modify these entries from EasyList before adding it to Privacy Browser. I already have to do that with a couple of other entries for different reasons as documented at https://www.stoutner.com/privacy-browser/blocklists/easylist/. The more difficult solution is to get EasyList to modify these entries, as I have a hard time believing any of the URLs they are trying to block actually contain `$`. Rather, these regular expressions look like they were written by someone trying to catch all possible string combinations.

#8

Updated by Giampiero Ammazzini 6 months ago

I saw that they changed them, but they not addressed the problem:

``/^https?:\/\/.*.(streamplay|steamplay).*\/.*[?&$=&!]/$script,subdocument
/^https?:\/\/.*(powvideo|powvldeo|povvideo).*\.*[?&$=&!]/$script,subdocument
/^https:\/\/([a-z]+\.)?sythe\.org\/\$.*[\w\W]{20,}/$image``

Plus we have now a third regex causing the problem, I have seen https://www.stoutner.com/privacy-browser/blocklists/easylist/ , maybe could be added as a case.

#9

Updated by Soren Stoutner 6 months ago

Yeah, I'll probably just have to delete those entries every time.

Also available in: Atom PDF