Repository navigation
OAUTH-001A2K — Bound Strava OAuth token JSON responses before parsing - #615
Conversation
✅ Deploy Preview for luminous-fox-7c393f ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
SELF-REVIEW / EXACT-HEAD RELEASE GATE: GO Exact head Independent exact-head runtime/resource-lifecycle, test-quality/reliability, security/scope, privacy/logging, documentation, and backup-officer reviews found no remaining STOP. One inaccurate refactored test title was corrected before commit and independently re-reviewed. Worktree and diff check are clean; scope is exactly Hosted CI run No code is merged by this comment. No Firebase deployment, production website publication, |
|
COMPLETE / MERGED / CLAIM RELEASED Reviewed head Deployment evidence: exact-head Netlify preview Officer impact: None — existing visible success/failure states are preserved. Officer documentation: None — this is a server-only provider-body containment with no officer procedure or visible surface change; Issue #614 closure and full local/hosted evidence: #614 (comment) COMPLETE / CLOSED / CLAIM RELEASED at |
The two Strava OAuth token paths now reject oversized or malformed native response bodies before JSON parsing or persistence, while preserving their existing fixed public outcomes.
Closes #614
Parent: #88
Change
Response/Headers/ReadableStreamobjects through captured native methods.Content-Lengthis absent or false-low.internalpath and transport/decode/parse failures on the existing fixedunavailablepath.functions/index.jsdoes not export.SECURITY.md.Trustworthy RED
Exact base
644d9f1fe3e6c06427412fd3ae37973dbbfeca20; minimal test-only binary diff SHA-25694dc7e995384a8398d918e688fb2690920d20a5d541a55a52c8ff399eec6f813.Node 20 focused result on that base: 1 failed / 721 skipped / 722 total. The old implementation consumed both native stream chunks (65,536 + 1 bytes), did not cancel, returned success, and made both writes. The strengthened witness requires the same two pulls, one cancellation, fixed unavailable, consumed state, and zero writes. Evidence: #614 (comment)
Verification
strava.test.js: 766 passed.git diff --check: passed.Independent runtime, exact-diff, test-quality, privacy/logging, documentation, and backup-officer reviews found no remaining STOP after one inaccurate test title was corrected and re-reviewed.
Residual risk
This ceiling covers only content-decoded chunks consumed here. It does not bound headers, compressed wire bytes, Undici buffering, one already-allocated chunk, parsed-object heap growth, CPU, or request/connect/read time. Cancellation cannot undo an exchange or token rotation; lost acknowledgement still requires reconciliation and must not be retried blindly. Activities/statistics body limits and sibling cleanup remain a separate unclaimed #88 child. Scope/account policy, refresh/revoke reconciliation, audit, IAM/encryption, deployment, provider configuration, production data, and live proof remain open.
Officer impact: None — this server-only guard preserves the existing member-visible success and fixed failure states while bounding OAuth token-response memory before parsing.
Officer documentation: None — no officer task, page structure, data route, permission, account ownership, deployment procedure, or visible wording changed. Existing source-only Strava guidance remains current.
Deployment evidence: Source commit
165934dee32ecc1daaafb596bab16160ff52e6b0is pushed and local tests passed. Code is not yet merged. No website publication orrunmprc.comrevision is claimed. Firebase was not deployed. No Strava or outside-provider configuration/action occurred. No production data was read or changed. Production/live behavior was not tested or verified.