Skip to content

$urlskip redirects to the wrong URL when the extracted string contains non-unicode-encoded characters #3956

@otksm

Description

@otksm

Prerequisites

  • I verified that this is not a filter list issue. Report any issues with filter lists or broken website functionality in the uAssets issue tracker.
  • This is NOT a YouTube, Facebook or Twitch report. These sites MUST be reported by clicking their respective links.
  • This is not a support issue or a question. For support, questions, or help, visit /r/uBlockOrigin.
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
  • The issue is not present after disabling uBO in the browser.
  • I checked the documentation to understand that the issue I am reporting is not normal behavior.

I tried to reproduce the issue when...

  • uBO is the only extension.
  • uBO uses default lists and settings.
  • using a new, unmodified browser profile.

Description

For example when part of the pathname is encoded in EUC-JP.

I am not sure what the correct course of action should be. WIKIWIKI also used to encode part of their pathname in EUC-JP, but today they are redirected server-side to unicode-encoded URLs.

FWIW I first encountered this issue when using Request Control's filter action, but uBO also failed in a slightly different way. Works as expected when using Request Control's redirect action, and similar addons such as Skip Redirect or Redirector.

A specific URL where the issue occurs.

www.pixiv.net/jump.php?https://seesaawiki.jp/w/staff_wiki/d/Wiki%a4%c3%a4%c6%a4%ca%a4%cb%a1%a9

Steps to Reproduce

  1. Add ||pixiv.net/jump.php?$urlskip=&1 to My filters and enable Allow custom filters requiring trust.
  2. Navigate to the above URL.

Expected behavior

uBO redirects the URL to https://seesaawiki.jp/w/staff_wiki/d/Wiki%a4%c3%a4%c6%a4%ca%a4%cb%a1%a9.

Actual behavior

uBO redirected the URL to https://seesaawiki.jp/w/staff_wiki/d/Wiki%EF%BF%BD%C3%A4%C6%A4%CA%A4%CB%A1%EF%BF%BD.

A cursory search suggests that %EF%BF%BD is the replacement character in UTF-8.

uBO version

1.69.0

Browser name and version

Firefox 140.8.0esr

Operating System and version

Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions