Skip to content

ublockorigin cannot filter the tracking params in url in some particular case (filter function -> $removeparam)Β #1951

Closed

Description

@cxw620

Prerequisites

I tried to reproduce the issue when...

  • uBO is the only extension
  • uBO with default lists/settings
  • using a new, unmodified browser profile

URL(s) where the issue occurs

baidu.com

Describe the issue

As shown in the issue title.

ublockorigin cannot filter the tracking params in url in some particular case. (filter function -> $removeparam)

It is hard to describe in English for I am Chinese, so I describe the issue in details with some screenshots. Please refer to them.

Screenshot(s)

image
image
image

Notes

In my opinion, that ublockorigin my not filter tracking params in URL twice until a new tab is created causes such issue.

Reasons and examples were also described in screenshots.

Configuration

{
  "timeStamp": 1643201137402,
  "version": "1.40.8",
  "userSettings": {
    "advancedUserEnabled": true,
    "cloudStorageEnabled": true,
    "externalLists": "https://anti-ad.net/adguard.txt\nhttps://raw.githubusercontent.com/cxw620/AdGuard-Rules/main/wjx-AdGuard.txt\nhttps://raw.githubusercontent.com/cxw620/AdGuard-Rules/main/wjx-AdGuardHome-strict.txt",
    "importedLists": [
      "https://anti-ad.net/adguard.txt",
      "https://raw.githubusercontent.com/cxw620/AdGuard-Rules/main/wjx-AdGuard.txt",
      "https://raw.githubusercontent.com/cxw620/AdGuard-Rules/main/wjx-AdGuardHome-strict.txt"
    ],
    "popupPanelSections": 31
  },
  "selectedFilterLists": [
    "user-filters",
    "ublock-filters",
    "ublock-badware",
    "ublock-privacy",
    "ublock-abuse",
    "ublock-unbreak",
    "adguard-generic",
    "adguard-mobile",
    "easylist",
    "adguard-spyware",
    "adguard-spyware-url",
    "block-lan",
    "easyprivacy",
    "urlhaus-1",
    "curben-phishing",
    "curben-pup",
    "adguard-annoyance",
    "adguard-social",
    "fanboy-thirdparty_social",
    "fanboy-cookiemonster",
    "fanboy-annoyance",
    "fanboy-social",
    "ublock-annoyances",
    "dpollock-0",
    "mvps-0",
    "plowe-0",
    "CHN-0",
    "https://raw.githubusercontent.com/cxw620/AdGuard-Rules/main/wjx-AdGuard.txt",
    "https://raw.githubusercontent.com/cxw620/AdGuard-Rules/main/wjx-AdGuardHome-strict.txt",
    "https://anti-ad.net/adguard.txt"
  ],
  "hiddenSettings": {
    "autoUpdatePeriod": 1,
    "consoleLogLevel": "info",
    "updateAssetBypassBrowserCache": true
  },
  "whitelist": [
    "about-scheme",
    "cdn.ctyun.cn",
    "chrome-extension-scheme",
    "chrome-scheme",
    "edge-scheme",
    "login.partner.microsoftonline.cn",
    "moz-extension-scheme",
    "opera-scheme",
    "portal.office.com",
    "portal.partner.microsoftonline.cn",
    "read.celestial-star.ltd",
    "uptimerobot.com",
    "vivaldi-scheme",
    "www.bilibili.com",
    "wyciwyg-scheme"
  ],
  "dynamicFilteringString": "behind-the-scene * * noop\nbehind-the-scene * inline-script noop\nbehind-the-scene * 1p-script noop\nbehind-the-scene * 3p-script noop\nbehind-the-scene * 3p-frame noop\nbehind-the-scene * image noop\nbehind-the-scene * 3p noop",
  "urlFilteringString": "",
  "hostnameSwitchesString": "no-large-media: behind-the-scene false\nno-csp-reports: * true\nno-strict-blocking: passport.biligame.com true",
  "userFilters": "! Title: ζ΅θ§ˆε™¨θ‘₯ε……θ§„εˆ™\n! Update Time: 2022-01-22 16:18:00\n! Ver.: 1.0.10\n! Update Details\n!! --------------------\n!! 首欑更新\n!! --------------------\n! Notes\n!! --------------------\n!! ζœ¬θ§„εˆ™εŒ…ε«δΊ†ζ΅θ§ˆε™¨θ§„εˆ™οΌŒι€‚εˆADB,AdGuard,ublock使用\n!! --------------------\n\n!! --------------------\n! [ι‘΅ι’θ§„εˆ™]\n!! δ»₯δΈ‹δΈΊurl参数拦ζˆͺ\n!! [Baidu]\n||*baidu*$removeparam=rsv_sug1\n||*baidu*$removeparam=rsv_sug2\n||*baidu*$removeparam=rsv_sug3\n||*baidu*$removeparam=rsv_sug4\n||*baidu*$removeparam=rsv_sug5\n||*baidu*$removeparam=rsv_cq\n||*baidu*$removeparam=rsv_dl\n||*baidu*$removeparam=rsv_bp\n||*baidu*$removeparam=rsv_pq\n||*baidu*$removeparam=rsv_enter\n||*baidu*$removeparam=rsv_jmp\n||*baidu*$removeparam=rsv_btype\n||*baidu*$removeparam=rqlang\n||*baidu*$removeparam=oq\n||*baidu*$removeparam=rqid\n||*baidu*$removeparam=rsf\n||*baidu*$removeparam=sa\n||*baidu*$removeparam=bs\n||*baidu*$removeparam=usm\n||*baidu*$removeparam=tn\n||*baidu*$removeparam=dyTabStr\n||*baidu*$removeparam=euri\n||*baidu*$removeparam=lm\n||*baidu*$removeparam=ps\n||*baidu*$removeparam=ct\n||*baidu*$removeparam=cl\n||*baidu*$removeparam=nc\n||*baidu*$removeparam=wrsv_spt\n@@||image.baidu.com$removeparam=tn\n||*baidu*$removeparam=pn\n||*baidu*$removeparam=rn\n||*baidu*$removeparam=rtt\n||*baidu*$removeparam=bsst\n||*baidu*$removeparam=s\n||*baidu*$removeparam=fr\n||*baidu*$removeparam=inputT\n||*baidu*$removeparam=aptstamp\n||*baidu*$removeparam=top\n||*baidu*$removeparam=total_res_num\n||*baidu*$removeparam=frsrcid\n||*baidu*$removeparam=frorder\n||*baidu*$removeparam=lid\n||*baidu*$removeparam=sf_ref\n||*baidu*$removeparam=pcEqid\n||*baidu*$removeparam=fromtitle\n||*baidu*$removeparam=fromid\n||*baidu*$removeparam=ala\n||*baidu*$removeparam=alatpl\n||*baidu*$removeparam=pos\n||*baidu*$removeparam=wfr\n||*baidu*$removeparam=for\n!! [Google]\n$removeparam=iflsig\n$removeparam=ved\n$removeparam=uact\n$removeparam=sclient\n!! [bing]\n||*bing*$removeparam=form\n||*bing*$removeparam=FORM\n||*bing*$removeparam=sp\n||*bing*$removeparam=pq\n||*bing*$removeparam=sc\n||*bing*$removeparam=qs\n||*bing*$removeparam=sk\n||*bing*$removeparam=cvid\n!! --------------------\n!! δ»₯δΈ‹δΈΊεΉΏε‘Šζ‹¦ζˆͺ\n"
}

Activity

  1. iam-py-test commented on Jan 26, 2022

    @iam-py-test
    Contributor

    I'm not sure, but this may be caused by use of History.replaceState
    uBo does not register that a new website was loaded, so can not filter it. I think this is more of a browser issue than a uBo one

  2. uBlock-user commented on Jan 26, 2022

    @uBlock-user
    Member

    Only network requests get filtered, cosmetic replacement of url not.

  3. uBlock-user commented on Jan 26, 2022

    @uBlock-user
    Member

    Duplicate of #1767

  4. iam-py-test commented on Jan 26, 2022

    @iam-py-test
    Contributor

    Maybe new scriptlet to overwrite History.replaceState:

    (function(){
    History.prototype.replaceState = function(stateObj, title,url){
    if(url !== ""){
    location.href = url
    }
    }
    History.prototype.pushState = function(stateObj, title,url){
    if(url !== ""){
    location.href = url
    }
    }
    })()

    Edit: uses History.pushState not replaceState

  5. cxw620 commented on Jan 26, 2022

    @cxw620
    Author

    I found that if i use regular expression like this:||*baidu*$removeparam=/^[^wu]([^dr]{0,})([^l]{0,}).*/
    and cancel such function of Baidu:
    image
    the page seemed to be forced to reload and ubo works, although i takes more time to finish loading the page

  6. iam-py-test commented on Jan 26, 2022

    @iam-py-test
    Contributor

    If that solution works

  7. cxw620 commented on Jan 28, 2022

    @cxw620
    Author

    Is it "Search settings" -> "Do you want to display search results in real time as you type" (if translated correctly)?

    translation is correct. however i found that sometimes such solution didn't work. it really confuses me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions