]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/helpers/BlockListHelper.java
Add OpenPGP encrypted export. https://redmine.stoutner.com/issues/338
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / helpers / BlockListHelper.java
index 619537a989e3c71afd71ebeb90bf70e9e90f833c..80ef04065f39e31b1253b81316c9dd620c5f2f02 100644 (file)
@@ -20,7 +20,6 @@
 package com.stoutner.privacybrowser.helpers;
 
 import android.content.res.AssetManager;
-import android.net.Uri;
 
 import com.stoutner.privacybrowser.activities.MainWebViewActivity;
 
@@ -87,9 +86,14 @@ public class BlockListHelper {
                     //Log.i("BlockLists", "Not added: " + blockListEntry);
                 } else //noinspection StatementWithEmptyBody
                     if (blockListEntry.contains("$csp=script-src")) {  // Ignore entries that contain `$csp=script-src`.
-                    // Do nothing.  It is uncertain what this directive is even supposed to mean, and it is blocking entire websites like androidcentral.com.  https://redmine.stoutner.com/issues/306.
+                        // Do nothing.  It is uncertain what this directive is even supposed to mean, and it is blocking entire websites like androidcentral.com.  https://redmine.stoutner.com/issues/306.
 
-                    //Log.i("BlockLists", headers.get(1)[0] + " not added: " + originalBlockListEntry);
+                        //Log.i("BlockLists", headers.get(1)[0] + " not added: " + originalBlockListEntry);
+                } else //noinspection StatementWithEmptyBody
+                    if (blockListEntry.contains("$websocket") || blockListEntry.contains("$third-party,websocket") || blockListEntry.contains("$script,websocket")) {  // Ignore entries with `websocket`.
+                        // Do nothing.  Privacy Browser does not differentiate between websocket requests and other requests and these entries cause a lot of false positivies.
+
+                        //Log.i("BlockLists", headers.get(1)[0] + " not added: " + originalBlockListEntry);
                 } else if (blockListEntry.startsWith("!")) {  //  Comment entries.
                     if (blockListEntry.startsWith("! Version:")) {
                         // Get the list version number.