Skip to content

[codex] fix: guard DPoP fallback URL construction#5

Merged
StiensWout merged 1 commit into
staging/fix-dpop-fallback-url-guardfrom
codex/fix/fix-dpop-fallback-url-guard
Jun 22, 2026
Merged

[codex] fix: guard DPoP fallback URL construction#5
StiensWout merged 1 commit into
staging/fix-dpop-fallback-url-guardfrom
codex/fix/fix-dpop-fallback-url-guard

Conversation

@StiensWout

Copy link
Copy Markdown
Owner

Summary

  • Guard DPoP fallback request URL construction so malformed Host or request URL values return null instead of throwing.
  • Convert an unnormalizable DPoP request URL into an invalid-credentials auth failure before proof verification.

Root cause

requestAbsoluteUrl caught invalid absolute originalUrl parsing, then built a fallback URL from originalUrl and Host without guarding that second new URL(...) call.

Impact

Malformed Host values during DPoP auth now fail as ServerAuthInvalidCredentialError with Invalid DPoP request URL. instead of surfacing as a defect. Valid absolute URLs and existing relative URL fallback behavior are preserved.

Validation

  • PATH="$HOME/.vite-plus/bin:$PATH" vp test apps/server/src/auth/dpop.test.ts
  • PATH="$HOME/.vite-plus/bin:$PATH" vp check
  • PATH="$HOME/.vite-plus/bin:$PATH" vp run typecheck

Co-authored-by: Codex <codex@openai.com>
@StiensWout
StiensWout merged commit 39cf30c into staging/fix-dpop-fallback-url-guard Jun 22, 2026
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