pathFor: adoptPage trusts a mutable page global and a NUL/replacement-char id can escape-collide
还没有人认领这个 Issue。
评估
- 难度
- 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 内容生成。
描述
Follow-up to #182 / #215.
What is wrong
Two residual identity-collision paths remain after the duplicate-id fix:
adoptPageinstalls the path helper only ifwindow.__usablPathForis not already a function. A page that already navigated can define its ownwindow.__usablPathFor = () => '#dup', and adoptPage preserves it, so every element collapses to one identity.- 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 分钟
- 30 天内合并 PR
- 8
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
usabl-dev/usabl 的其他 Issue
-
area: engine bug
难度 2/5 1-3 小时 新手友好度 86/100
-
Stop hook allows a stop on an unknown verdict, and the self-check prints IDLE for a null verdict未关闭area: assistants bug
难度 2/5 1-3 小时 新手友好度 75/100
-
area: engine bug security
难度 2/5 1-3 小时 新手友好度 72/100
-
Overlay: browser context failures are counted per plugin, not per browser, and close is not shared未关闭area: overlay bug
难度 2/5 1-3 小时 新手友好度 64/100
-
area: engine enhancement performance
难度 2/5 1-3 小时 新手友好度 68/100
相似的 Issue
-
bug hacktoberfest help wanted
难度 2/5 1-3 小时 新手友好度 82/100
libredb/libredb-studio#1941 ·
维护者通常 1 天内回复
-
chore other
难度 2/5 1-3 小时 新手友好度 78/100
alastair-smith/card-games#308 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 86/100
paperclipai/paperclip#17379 ·
维护者通常 1 天内回复
-
[good first issue, hacktoberfest] 🏯 Hacktoberfest Task - Add new Anime Quote 626 (good-first-issue)未关闭community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 76/100
lingdojo/kana-dojo#33040 · 1 条评论 · 5 个 reaction ·
维护者通常 1 天内回复
-
bug mobile ui
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复