Skip to content

fix(opencode): validate upgrade requests - #42022

Closed
opencode-agent[bot] wants to merge 1 commit into
devfrom
upgrade-json
Closed

opencode-agent[bot] wants to merge 1 commit into
devfrom
upgrade-json

Conversation

@opencode-agent

Copy link
Copy Markdown
Contributor

Summary

  • require application/json for POST /global/upgrade, forcing browser cross-origin calls through CORS preflight
  • reject upgrade targets that are not valid semantic versions
  • cover JSON, content-type, and semver behavior with focused HTTP API tests

Checks

  • bun test test/server/httpapi-global.test.ts
  • bun run generate from packages/client
  • Prettier check on changed files
  • bun typecheck attempted from packages/opencode but did not complete within 10 minutes on the shared host

Requested by: @thdxr (Dax via Slack)

@github-actions

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant