René's URL Explorer Experiment


Title: id(web/world): upload and compile socket handlers cast JSON.parse straight to WorldFrame — non-object frames crash or hang the flow, non-integer chunk_bytes corrupts the chunk stream · Issue #5034 · developing-today/code · GitHub

Open Graph Title: id(web/world): upload and compile socket handlers cast JSON.parse straight to WorldFrame — non-object frames crash or hang the flow, non-integer chunk_bytes corrupts the chunk stream · Issue #5034 · developing-today/code

X Title: id(web/world): upload and compile socket handlers cast JSON.parse straight to WorldFrame — non-object frames crash or hang the flow, non-integer chunk_bytes corrupts the chunk stream · Issue #5034 · developing-today/code

Description: id(web/world): upload and compile socket handlers cast JSON.parse straight to WorldFrame — non-object frames crash or hang the flow, and a non-integer chunk_bytes corrupts the chunk stream Evidence Verified at origin/main 125789d in the ...

Open Graph Description: id(web/world): upload and compile socket handlers cast JSON.parse straight to WorldFrame — non-object frames crash or hang the flow, and a non-integer chunk_bytes corrupts the chunk stream Evidence...

X Description: id(web/world): upload and compile socket handlers cast JSON.parse straight to WorldFrame — non-object frames crash or hang the flow, and a non-integer chunk_bytes corrupts the chunk stream Evidence...

Opengraph URL: https://github.com/developing-today/code/issues/5034

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"id(web/world): upload and compile socket handlers cast JSON.parse straight to WorldFrame — non-object frames crash or hang the flow, non-integer chunk_bytes corrupts the chunk stream","articleBody":"# id(web/world): upload and compile socket handlers cast JSON.parse straight to WorldFrame — non-object frames crash or hang the flow, and a non-integer chunk_bytes corrupts the chunk stream\n\n## Evidence\n\nVerified at origin/main 125789ddb in the laptop tree. In `pkgs/id/web/src/world.ts`:\n\n- `:618` (module-upload socket) — `frame = JSON.parse(String(message.data)) as typeof frame;` and `:739` (Roc-compile socket) — the same cast to `WorldFrame`. The `try` covers only the parse; the very next reads (`frame.type` at `:624` / `:745`) are unguarded.\n- `:631-636` — the only `chunk_bytes` validation is `!chunkBytes || chunkBytes \u003c 1 || chunkBytes > 6 * 1024`: no integer/type check, so a fractional or string `chunk_bytes` passes and drives the chunk loop at `:641` (`offset += chunkBytes`, `file.slice(offset, offset + chunkBytes)`, `install_chunk` frames carrying that offset).\n- Contrast in the same file: the main world `receive()` at `:188-200` parses to `unknown`, requires `isRecord(parsed)` and `typeof parsed.type === \"string\"`, and calls `rejectFrame()` otherwise. The upload/compile handlers skip the file's own established guard.\n- The server side expects integer offsets: `pkgs/id/src/world_session/types.rs:287` and `:357` type `install_chunk`'s `offset` as `usize`.\n\nReproduction (laptop probe `~/git/fleet/probe-2026-11-03-laneB-worldframe/probe.mjs`, replicating the handler logic at :616-645 verbatim with stubbed socket/file; run with bun at 125789ddb):\n\n```\nnull                                  => UNCAUGHT THROW: TypeError - null is not an object (evaluating 'frame.type') | no status, socket never closed\n123 / \"hi\" / [1,2]                    => no branch matched, socket left open, no status shown (flow hangs; install button stays disabled until a close that never comes)\n{\"type\":\"upload_ready\",\"chunk_bytes\":100.5} => install_chunk offsets sent: 0, 100.5, 201, ... (fractional offsets the server's usize field rejects)\n{\"type\":\"upload_ready\",\"chunk_bytes\":\"512\"} => offsets sent: 0, then the string \"0512\"; second chunk slices 1488 bytes (overlapping/oversized) — a corrupted chunk stream\n{\"type\":\"upload_ready\",\"chunk_bytes\":512}   => control: offsets 0, 512, 1024 — correct\n{\"type\":\"error\"}                            => control: status shown, socket closed — correct\n```\n\n## Why it matters\n\nThese two handlers are the admin paths for installing a world program (wasm upload and Roc compile). Any malformed or unexpected frame from the host connection — a proxy/error page frame, a future server frame shape, a hand-rolled client test — either throws uncaught (no error surfaced, no cleanup), hangs the flow silently with the button disabled, or, for a non-integer `chunk_bytes`, sends a chunk stream the server cannot accept, failing the install opaquely partway through. The main socket in the same file already demonstrates the intended validation pattern, so the gap is an inconsistency, not a design choice.\n\n## Acceptance criteria\n\n- Both handlers validate the parsed frame before use (record + string `type`, mirroring `receive()`/`isRecord` in the same file); an invalid frame sets the existing \"invalid upload/compile response\" error status and closes the socket — no uncaught throw, no silent hang.\n- `chunk_bytes` is accepted only as a finite integer within the existing 1..=6144 range (`Number.isInteger`); anything else takes the existing \"invalid module chunk size\" path.\n- Web tests cover: `null`, a JSON number/string/array frame, fractional `chunk_bytes`, and string `chunk_bytes` for the upload handler (and the non-object cases for the compile handler); the existing world web tests still pass.\n","author":{"url":"https://github.com/apps/developing-today","@type":"Person","name":"developing-today"},"datePublished":"2026-11-03T17:16:57Z","url":"https://github.com/developing-today/code/issues/5034"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:ca21f584-0656-e0ab-cbe2-81d80670819e
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCFA4:167B3F:3577B3:4621D8:6B0763D9
html-safe-noncef5267cbbcb8742d191a41f2730c06eef54e7fb2b6f969ad7020ed0a9b17252ac
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRkE0OjE2N0IzRjozNTc3QjM6NDYyMUQ4OjZCMDc2M0Q5IiwidmlzaXRvcl9pZCI6IjMxMzMzOTA4NTQyNjY3NzQ0ODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaceaab7cca92528b53c8ceed112487060589bd46105fb09f807862ad156ef66a1d
hovercard-subject-tagissue:6187613192
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/5034/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a76733bcc426798e5eb41cfe5487a40c9f26e5d883af8a36a77a5bb1300232c0/developing-today/code/issues/5034
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a76733bcc426798e5eb41cfe5487a40c9f26e5d883af8a36a77a5bb1300232c0/developing-today/code/issues/5034
og:image:altid(web/world): upload and compile socket handlers cast JSON.parse straight to WorldFrame — non-object frames crash or hang the flow, and a non-integer chunk_bytes corrupts the chunk stream Evidence...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedeveloping-today[bot]
hostnamegithub.com
expected-hostnamegithub.com
None7a557ecc960a3ae6e299fc66b0bc9132072f8860191648e6749fee5d3ff00d82
turbo-cache-controlno-preview
go-importgithub.com/developing-today/code git https://github.com/developing-today/code.git
octolytics-dimension-user_id26439447
octolytics-dimension-user_logindeveloping-today
octolytics-dimension-repository_id627308783
octolytics-dimension-repository_nwodeveloping-today/code
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id627308783
octolytics-dimension-repository_network_root_nwodeveloping-today/code
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasebd845eb7947c1ed8c850f7ab415a51339d162de3
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/developing-today/code/issues/5034#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F5034
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F5034
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=developing-today%2Fcode
Reloadhttps://github.com/developing-today/code/issues/5034
Reloadhttps://github.com/developing-today/code/issues/5034
Reloadhttps://github.com/developing-today/code/issues/5034
developing-todayhttps://github.com/developing-today
codehttps://github.com/developing-today/code
Codehttps://github.com/developing-today/code
Issues1k (1k)https://github.com/developing-today/code/issues
Pull requests205 (205)https://github.com/developing-today/code/pulls
Discussionshttps://github.com/developing-today/code/discussions
Actionshttps://github.com/developing-today/code/actions
Projectshttps://github.com/developing-today/code/projects
Wikihttps://github.com/developing-today/code/wiki
Security and qualityhttps://github.com/developing-today/code/security
Insightshttps://github.com/developing-today/code/insights
https://github.com/developing-today/code
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/5034
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/5034
id(web/world): upload and compile socket handlers cast JSON.parse straight to WorldFrame — non-object frames crash or hang the flow, non-integer chunk_bytes corrupts the chunk streamhttps://github.com/developing-today/code/issues/5034#top
app/idhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22app%2Fid%22
kind/bughttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
priority/lowhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22priority%2Flow%22
source/creatorhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22source%2Fcreator%22
task/small-fixhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22task%2Fsmall-fix%22
https://github.com/apps/developing-today
developing-todayhttps://github.com/apps/developing-today
on Nov 3, 2026https://github.com/developing-today/code/issues/5034#issue-6187613192
125789dhttps://github.com/developing-today/code/commit/125789ddb6d2091d4308fb4028ef2a7add5031a0
125789dhttps://github.com/developing-today/code/commit/125789ddb6d2091d4308fb4028ef2a7add5031a0
developing-todayhttps://github.com/apps/developing-today
kind/bughttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
task/small-fixhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22task%2Fsmall-fix%22
status/needs-triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fneeds-triage%22
source/creatorhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22source%2Fcreator%22
priority/lowhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22priority%2Flow%22
queue/queuedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fqueued%22
app/idhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22app%2Fid%22
on Nov 3, 2026https://github.com/developing-today/code/issues/5034#event-35045883910
https://github.com/apps/developing-today
developing-todayhttps://github.com/apps/developing-today
on Nov 3, 2026https://github.com/developing-today/code/issues/5034#issuecomment-6610681172
developing.todayhttps://kaneo.security.cab
125789dhttps://github.com/developing-today/code/commit/125789ddb6d2091d4308fb4028ef2a7add5031a0
dezren39https://github.com/dezren39
work/assignedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22work%2Fassigned%22
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
queue/parkedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fparked%22
status/parkedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fparked%22
status/needs-triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fneeds-triage%22
queue/queuedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fqueued%22
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
on Nov 3, 2026https://github.com/developing-today/code/issues/5034#event-35046660109
https://github.com/dezren39
dezren39https://github.com/dezren39
on Nov 3, 2026https://github.com/developing-today/code/issues/5034#issuecomment-6611071362
id(web/world): upload and compile socket handlers cast JSON.parse straight to WorldFrame — non-object frames crash or hang the flow, non-integer chunk_bytes corrupts the chunk stream #5034https://github.com/developing-today/code/issues/5034
c661e5fhttps://github.com/developing-today/code/commit/c661e5fa422514efcf25c51eee273352a1a93be1
fix(id/web): validate frames and chunk_bytes in world upload/compile socket handlers (#5034) #5041https://github.com/developing-today/code/pull/5041
fix(id/web): validate frames and chunk_bytes in world upload/compile socket handlers (#5034) #5041https://github.com/developing-today/code/pull/5041
fix(id/web): validate frames and chunk_bytes in world upload/compile socket handlers (#5034) #5041https://github.com/developing-today/code/pull/5041
id(web/world): upload and compile socket handlers cast JSON.parse straight to WorldFrame — non-object frames crash or hang the flow, non-integer chunk_bytes corrupts the chunk stream #5034https://github.com/developing-today/code/issues/5034
fix(id/web): validate frames and chunk_bytes in world upload/compile socket handlers (#5034) #5041https://github.com/developing-today/code/pull/5041
dezren39https://github.com/dezren39
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
status/parkedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fparked%22
queue/parkedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fparked%22
on Nov 3, 2026https://github.com/developing-today/code/issues/5034#event-35049474432
https://github.com/dezren39
dezren39https://github.com/dezren39
on Nov 3, 2026https://github.com/developing-today/code/issues/5034#issuecomment-6611543331
fix(id/web): validate frames and chunk_bytes in world upload/compile socket handlers (#5034) #5041https://github.com/developing-today/code/pull/5041
fix(id/web): validate frames and chunk_bytes in world upload/compile socket handlers (#5034) #5041https://github.com/developing-today/code/pull/5041
id(web/world): upload and compile socket handlers cast JSON.parse straight to WorldFrame — non-object frames crash or hang the flow, non-integer chunk_bytes corrupts the chunk stream #5034https://github.com/developing-today/code/issues/5034
fix(id/web): validate frames and chunk_bytes in world upload/compile socket handlers (#5034) #5041https://github.com/developing-today/code/pull/5041
id(web/world): upload and compile socket handlers cast JSON.parse straight to WorldFrame — non-object frames crash or hang the flow, non-integer chunk_bytes corrupts the chunk stream #5034https://github.com/developing-today/code/issues/5034
fix(id/web): validate frames and chunk_bytes in world upload/compile socket handlers (#5034) #5041https://github.com/developing-today/code/pull/5041
c661e5fhttps://github.com/developing-today/code/commit/c661e5fa422514efcf25c51eee273352a1a93be1
dezren39https://github.com/dezren39
on Nov 3, 2026https://github.com/developing-today/code/issues/5034#event-35049570686
fix(id/web): validate frames and chunk_bytes in world upload/compile …https://github.com/developing-today/code/commit/7de65a8fe01044f20fb76c9d003994c2c1d96444
7de65a8https://github.com/developing-today/code/commit/7de65a8fe01044f20fb76c9d003994c2c1d96444
https://github.com/dezren39
dezren39https://github.com/dezren39
on Nov 3, 2026https://github.com/developing-today/code/issues/5034#issuecomment-6611570126
fix(id/web): validate frames and chunk_bytes in world upload/compile socket handlers (#5034) #5041https://github.com/developing-today/code/pull/5041
fix(id/web): validate frames and chunk_bytes in world upload/compile socket handlers (#5034) #5041https://github.com/developing-today/code/pull/5041
7de65a8https://github.com/developing-today/code/commit/7de65a8fe01044f20fb76c9d003994c2c1d96444
fix(id/web): validate frames and chunk_bytes in world upload/compile socket handlers (#5034) #5041https://github.com/developing-today/code/pull/5041
fix(id/web): validate frames and chunk_bytes in world upload/compile socket handlers (#5034) #5041https://github.com/developing-today/code/pull/5041
dezren39https://github.com/dezren39
completedhttps://github.com/developing-today/code/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Nov 3, 2026https://github.com/developing-today/code/issues/5034#event-35049627973
dezren39https://github.com/dezren39
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
work/assignedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22work%2Fassigned%22
on Nov 3, 2026https://github.com/developing-today/code/issues/5034#event-35049645993
Sign up for freehttps://github.com/signup?return_to=https://github.com/developing-today/code/issues/5034
Sign in to commenthttps://github.com/login?return_to=https://github.com/developing-today/code/issues/5034
app/idhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22app%2Fid%22
kind/bughttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
priority/lowhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22priority%2Flow%22
source/creatorhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22source%2Fcreator%22
task/small-fixhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22task%2Fsmall-fix%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.