Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

pathFor: adoptPage trusts a mutable page global and a NUL/replacement-char id can escape-collide

オープン
#220 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
65/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
playwright, typescript

調査の方向性

Start by locating adoptPage and the path helper, then inspect the duplicate-id fix in #182 and #215. Check how the helper is chosen and how escaped id selectors are validated, including invalid-selector handling. Done means page-defined globals cannot collapse paths and distinct elements with NUL or U+FFFD ids do not share a path; verify with focused tests for both cases.

索引モデルが issue の本文から書いたものです。

説明

area: engine bug security

Follow-up to #182 / #215.

What is wrong

Two residual identity-collision paths remain after the duplicate-id fix:

  1. adoptPage installs the path helper only if window.__usablPathFor is not already a function. A page that already navigated can define its own window.__usablPathFor = () => '#dup', and adoptPage preserves it, so every element collapses to one identity.
  2. The uniqueness guard checks that the escaped id selector matches exactly one element, not that the match is the element in hand. A NUL id and a literal U+FFFD id both escape to the same selector, so two distinct elements can still collide.

Why it matters

Both reintroduce the set-difference false green the id-collision work closed, for a page that is hostile or has unusual ids.

Fix

Do not trust a mutable page global: evaluate a private path function per query, or install an immutable binding. Before using an id selector, require exactly one match AND matches[0] === element, with invalid-selector handling.

主要言語
TypeScript
スター
0
フォーク
0
平均マージ
2時間 48分
マージ済み PR(30日)
8

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

usabl-dev/usabl のほかの issue

usabl-dev/usabl の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。