Skip to content

bug: consume request body before sending response - #2066

Open
cstamas wants to merge 1 commit into
eclipse-openvsx:mainfrom
cstamas:consume-payload-before-respond
Open

bug: consume request body before sending response#2066
cstamas wants to merge 1 commit into
eclipse-openvsx:mainfrom
cstamas:consume-payload-before-respond

Conversation

@cstamas

@cstamas cstamas commented Aug 12, 2026

Copy link
Copy Markdown
Member

As otherwise LB/proxies may translate this as server error and produce 50x errors downstream.

Changes:

  • in case of inactive/expired token return 401 instead of 400
  • in case of attempt to publish with expired token, consume (into /dev/null) the payload BEFORE sending response, to cleanly follow HTTP request/response flow

Fixes EclipseFdn/open-vsx.org#12463

Note: Changed code is/will conflict with trusted publishing, where even the "verify" use case has been totally separated out. This PR merely copies the applicable bits from trusted publishing AccessTokenService and adds body consumption before throwing error (and modifies error from 400 to 401).

As otherwise MITM proxies may translate this as server error
and produce 50x errors.
@autumnfound

Copy link
Copy Markdown
Contributor

LGTM

@cstamas
cstamas marked this pull request as ready for review August 14, 2026 12:12
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.

Open VSX Publishing endpoint returning 503 instead of 403 for rotated / expired key

2 participants