fix(server): inert proxy responses, API-call header, image-only uploads; origin check by host
From the final review: proxied archived HTML could run on our origin and read a remembered token; /api/upload accepted any Wayback URL and GIF-prefixed bytes; the origin check broke behind a TLS proxy; one unreadable snapshot could fail a run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5084f8c557
commit
baa3476b73
16 files changed
+183
-26
No files matched your search
@@ -23,3 +23,7 @@ test("finds tags and meta content by property or name", () => {
|
||||
test("textOf strips tags and collapses whitespace", () => {
|
||||
expect(textOf("<span>Tower</span>\n of & God ")).toBe("Tower of & God");
|
||||
});
|
||||
|
||||
test("an out-of-range numeric entity is left as written instead of throwing", () => {
|
||||
expect(decodeEntities("a � b � c")).toBe("a � b � c");
|
||||
});
|
||||
Reference in new issue
Block a user