2.0.0-rc.15: <Errored> writes a string child as raw HTML on the server
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, typescript
Hướng nghiên cứu
Start with the repro in the issue: call renderToString on a string child under Loading and under Errored, and compare the output. Find where the server path for Errored emits its children without the escaping that Loading applies. Done when Errored escapes string, array and function children the same way Loading does, and the escape() workaround is no longer needed.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
On the server, a string child of <Errored> is written into the HTML unescaped. The same string is escaped as a plain child and as a child of <Loading>, so user text returned from a component inside an error boundary becomes live markup (stored XSS), and the client, which renders a text node, mismatches on hydrate.
Versions: solid-js and @solidjs/web 2.0.0-rc.15 (also rc.14), renderToString on Node.
import { createComponent, Errored, Loading } from "solid-js"
import { renderToString } from "@solidjs/web"
const evil = "<script>alert(1)</script>"
const show = (name: string, fn: () => unknown) => console.log(name.padEnd(12), renderToString(fn as never))
show("plain", () => evil)
show("Loading", () => createComponent(Loading, { fallback: "", get children() { return evil } }))
show("Errored", () => createComponent(Errored, { fallback: "", get children() { return evil } }))
plain <script>alert(1)</script>
Loading <script>alert(1)</script>
Errored <script>alert(1)</script>
An array of strings, or a function returning a string, as the boundary's child is raw too.
Expected: Errored escapes its children as Loading does. Workaround: pass the boundary's children through escape() from @solidjs/web on the server.
- Ngôn ngữ chính
- TypeScript
- Star
- 36.1k
- Fork
- 1.1k
- Merge trung bình
- 11 giờ 17 phút
- Pull request đã merge (30 ngày)
- 371
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của solidjs/solid
-
`lazy()`: remounting an already-loaded component renders empty (or the Suspense fallback) since 1.9.14Có thể đã có người làm @itisrmk đã nhận 4 ngày trước. Đang mở1.x
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[2.0] The MIGRATION.md replacement for `from()` keeps the upstream subscription after dispose; add a subscription helperCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
solidjs/solid#4182 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
`createRoot`'s dispose function keeps `fn` alive, so `<For>`/`<Index>` rows retain removed list itemsCó thể đã có người làm @boombang đã nhận 7 ngày trước. Đang mở1.x
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 1 ngày
-
signals: a landing reveals a held write its stale reader re-derives onto a new flight (U-5, D-9)Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của solidjs/solid
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
phivk/rubiks-lab#33 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
BUG:Edit Album strips spaces from the password so albums with a leading/trailing space in the password can't be editedCó thể đã có người làm @ManyaJain111 đã nhận hôm nay. Đang mởbug enhancement possible-duplicate
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
AOSSIE-Org/PictoPy#1637 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
chaitin/MonkeyCode#1437 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
rtdb-info-connected-order test: unhandled 'connection is closed' rejection fails the CLI suiteĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:cards enhancement migration ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
fil-donadoni/tolaria#6309 ·
Maintainer thường phản hồi trong vòng 1 ngày