Repository navigation
Conversation
…ndroid is a real thing
naorpeled
added a commit
that referenced
this pull request
Aug 30, 2026
Code scanning (js/polynomial-redos, alerts #16 and #17) ------------------------------------------------------- bowser applies these regexps to attacker-controlled User-Agent strings, and four of them ran in quadratic time: * The "Something else" fallback used /^(.*)\/(.*) / and /^(.*)\/(.*)[ \t]\((.*)/. Two unbounded `.*` before a required literal make the split ambiguous, so a UA of "/a" repeated backtracks O(n^2). Greedy `(.*)` always picks the last `/` that still has the delimiter after it, so the second group can never span a `/` -- narrowing it to `[^/]*` is exactly equivalent and removes the ambiguity. Verified identical on 1,000,000 fuzzed inputs and on the full acceptance corpus. * The Linespider and SlackBot version regexps used `(?:-[-\w]+)?` before a required `[\s/]`. Since `[-\w]` and `[\s/]` are disjoint the backtracking is pure waste, but the engine still walks it once per start position, so "linespider-" repeated is quadratic. Bounding the run to `{1,64}` makes it linear; no real bot-name suffix approaches 64 characters. A sweep of all 253 regexp literals in src/ (fuzzed for superlinear scaling, with the four pre-fix patterns used to confirm the detector works) reports no remaining superlinear regexps. test/unit/redos.js locks this in. Actions (actions/missing-workflow-permissions, alerts #5 and #15) ----------------------------------------------------------------- merge-to-master.yml and draft-or-update-next-release.yml had no `permissions` block and so inherited the default token. Both now declare least privilege, matching publish.yml and pull-request.yml. Dependabot (22 open alerts, all development scope) -------------------------------------------------- bowser ships no runtime dependencies, so none of these reached consumers, but they were live in CI. `pnpm audit` goes from 29 advisories to 0: * jsdoc 3 -> 4 (with docdash 1 -> 2) drops taffydb, which has no patched release, and picks up current markdown-it/linkify-it. * coveralls -> coveralls-next 6 drops `request`, which is deprecated with no patched release, along with form-data, qs 6.5.x, uuid 3 and tough-cookie 2. Same `coveralls` bin and same stdin contract; lcov conversion verified. * gh-pages 3 -> 6 clears the critical prototype pollution advisory. * pnpm overrides pin the remaining transitive-only advisories to the lowest patched release on each existing major. Verified: pnpm audit clean, lint clean, 346 tests pass (the acceptance corpus runs against both src/ and the built es5.js), build, package smoke test, and doc generation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request fixes an exception on Firefox on Android. It can't be assumed that because a user agent matches the string Android, that it is a Webkit browser.