Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[XSS] Fix harmless dots in URLs not being replaced#484

Open
pettinen wants to merge 1 commit into
hackademix:mainhackademix/noscript:mainfrom
pettinen:fix-415pettinen/noscript:fix-415Copy head branch name to clipboard
Open

[XSS] Fix harmless dots in URLs not being replaced#484
pettinen wants to merge 1 commit into
hackademix:mainhackademix/noscript:mainfrom
pettinen:fix-415pettinen/noscript:fix-415Copy head branch name to clipboard

Conversation

@pettinen
Copy link
Copy Markdown

@pettinen pettinen commented Nov 9, 2025

InjectionChecker._removeDots was called with this bound to globalThis instead of InjectionChecker, causing the dot-replace intended to reduce false positives to not work properly:

_removeDots(p) {
  // this === [object DedicatedWorkerGlobalScope]
  // this._dotRx === undefined
  return p.replace(this._dotRx, '|');
},
...
expr.replace(this._removeDotsRx, this._removeDots)

Fixes #415 at least.


I considered doing simply

-expr.replace(this._removeDotsRx, this._removeDots)
+expr.replace(this._removeDotsRx, (p) => p.replace(this._dotRx, '|'))

but presumably there might be some performance benefit from defining a function only once.

`InjectionChecker._removeDots` was called with `this` bound to
`globalThis` instead of `InjectionChecker`, causing the dot-replacing
intended to reduce false positives to not work properly.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warning against Beethoven Wikipedia page

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.