Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Announcement capture trusts a page global the page can define or replace

Đang mở
#296 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
52/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
playwright, typescript
Lĩnh vực
accessibility, testing-qa

Hướng nghiên cứu

Start by locating the announcement capture and checkPage adoption code, then read how the toast ancestor walk accesses attributes over CDP. Trace how the CLI init script exposes window.__usablDrain and how the path helper is guarded. Add tests for a page that predefines the drain and one that replaces it after load; each should produce a gap or failure, never a pass.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area: playwright bug security

What happens

Flow requirements read announcements through window.__usablDrain, a function in the page's own JavaScript world.

  • On an adopted page (checkPage), the capture is installed only if __usablDrain is not already defined. A page that defines its own before adoption keeps it.
  • On a CLI page, the init script defines it first, but page script can replace it afterwards.

Either way, page code can hand usabl announcements no screen reader spoke.

Why it matters

A flow requirement's expectedAnnouncement can pass on text the page supplied directly. That is a false green, and page text is supposed to be untrusted data.

Fix direction

Run the capture in an isolated world, the way the toast ancestor walk now reads attributes over CDP, or bind the drain to a value page script cannot reach. Add tests for a page that predefines the drain and for a page that replaces it after load. Both must give a gap or a failure, never a pass. The path helper has the same kind of guard and should be checked at the same time.

Ngôn ngữ chính
TypeScript
Star
0
Fork
0
Merge trung bình
2 giờ 48 phút
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của usabl-dev/usabl

Tất cả issue của usabl-dev/usabl

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.