Skip to content

test: move SSRF fixtures to httpbin.dev - #27

Closed
ChiragAgg5k wants to merge 1 commit into
mainfrom
test/ssrf-fixtures-httpbin-dev
Closed

ChiragAgg5k wants to merge 1 commit into
mainfrom
test/ssrf-fixtures-httpbin-dev

Conversation

@ChiragAgg5k

Copy link
Copy Markdown
Member

Why

Four SSRF e2e tests fail on main and on 0.3.10 alike. The cause isn't the guard: httpbin.org changed.

Fixture httpbin.org now Effect
/redirect-to?url=http://127.0.0.1… 200 page: "Forbidden redirect target: redirect target is an internal address" Browser never tries the private hop → 200 instead of 403
/base64/<script>… text/plain + nosniff Script never runs → 200 instead of 403

What

Fixture Now
Open redirect https://httpbin.dev/redirect-to?url= (still returns a 302 to internal targets)
Script page https://httpbin.dev/response-headers?Content-Type=text/html&page=<script>… (the parameter is echoed into a body served as text/html). The target is quoted with backticks because JSON escapes "

Verified

BASE_URL=… bun test tests/e2e/ssrf.test.ts against appwrite/browser:0.3.10: before 2 pass / 4 fail, after 6 pass / 0 fail (two runs).

httpbin.org now refuses redirects to internal addresses and serves /base64
as text/plain with nosniff, so the browser never attempted the private hop
and the four redirect and script tests captured a 200 instead of a 403.
@hansi-codes

hansi-codes Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

The updated fixtures and health check match the live endpoint behavior, and no actionable defects were found.

The SSRF end-to-end fixtures now use httpbin.dev for open redirects and HTML script navigation. The script-page helper URL-encodes the HTML and quotes the navigation target with backticks.

Verdict New comments Fixed Still open
✅ Approved 0 0 0
📂 Walkthrough · 1
File Change
tests/e2e/ssrf.test.ts Switched the external redirect and script-page fixtures to httpbin.dev and updated the script-page URL construction.

Reviewed aa56d74 · Details · Comment @hansi-codes review to re-run, or mention @hansi-codes with a question.

@hansi-codes hansi-codes Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Tier S · Looks good to merge. Summary

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

Docker Image Stats

Metric Value
Image Size 547MB
Memory Usage 107.5MiB
Cold Start Time 1.01s
Screenshot Time .90s

Screenshot benchmark: Average of 3 runs on https://appwrite.io

@ChiragAgg5k

Copy link
Copy Markdown
Member Author

Included in #26, merged.

@ChiragAgg5k ChiragAgg5k closed this Nov 1, 2026
@ChiragAgg5k
ChiragAgg5k deleted the test/ssrf-fixtures-httpbin-dev branch November 1, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant