pathFor: adoptPage trusts a mutable page global and a NUL/replacement-char id can escape-collide
维护者通常 1 天内回复
还没有人认领这个 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
- 平均合并
- 6 小时 25 分钟
- 30 天内合并 PR
- 46
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
usabl-dev/usabl 的其他 Issue
-
area: engine enhancement performance
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
Scan browser runs without Chromium's sandbox可能已有人在做 @eparenti 于 2 天前认领。 未关闭area: engine security
难度 4/5 3-5 天 新手友好度 46/100
维护者通常 1 天内回复
-
area: engine enhancement performance
难度 4/5 1-2 天 新手友好度 45/100
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
维护者通常 1 天内回复
-
area: engine enhancement performance
难度 4/5 3-5 天 新手友好度 35/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
Northeastern-Electric-Racing/FinishLine#4660 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
mihaip/infinite-mac#475 ·
-
Let TypeScript accept an initial object in ReactiveDict可能已有人在做 @yograj-vijay-yadav 今天认领。 未关闭bug good first issue help wanted workshop
难度 2/5 1-3 小时 新手友好度 92/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 83/100
marmelab/atomic-crm#401 ·
维护者通常 1 天内回复
-
account: profile
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 5 天内回复