Sync features/fixes from decolua/9router (v0.4.18 → v0.4.33)#17
Draft
quangdang46 wants to merge 1 commit into
Draft
Sync features/fixes from decolua/9router (v0.4.18 → v0.4.33)#17quangdang46 wants to merge 1 commit into
quangdang46 wants to merge 1 commit into
Conversation
…, DATA_DIR EACCES, Fal.ai endpoint, developer role) - web/src/components/page.tsx: scope OAuth callback postMessage to the existing expectedOrigins allowlist instead of '*' (CWE-1385, 9router #998). The wildcard origin leaked the live OAuth code/state to any page that could open the popup against the well-known redirect_uri. - web/src/shared/components/styles/global.css: add explicit color-scheme rules for <select> in dark mode so option text isn't rendered dark-on-dark on Chrome/Firefox (9router #997). - src/db/mod.rs: when DATA_DIR is set but not writable, fall back to the default ~/.openproxy data dir instead of crashing on startup. Other I/O errors (read-only filesystem, disk full, etc.) still propagate (9router #1005). - web/src/shared/constants/providers.ts: Fal.ai key test now hits https://api.fal.ai/v1/models?limit=1 (stable GET) instead of POSTing to a model-specific queue URL that was unreliable for validation (9router 0.4.29). - src/core/executor/api_key.rs: normalize role: 'developer' -> 'system' in transform_request so Deepseek / Groq / Mistral / Perplexity / Together / Fireworks / Cerebras / xAI / NVIDIA / etc. don't 400 on the OpenAI Responses-style 'developer' role (9router #1011 / #773). Includes 4 unit tests. The 9router CWE-295 DNS-bypass-fetch fix (#998 part 2) doesn't apply here — the Rust stack uses reqwest with default TLS verification everywhere; no 'dangerous_accept_invalid_certs'/'rejectUnauthorized: false' codepath exists. Similarly the 9router PORT-env model-test fix (#1014) doesn't apply — openproxy's internal_base_url already reads $PORT. Refs: decolua/9router commits 52c38cf, c7c1074, a48fa4e, 80a2bfc, b1f9...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Incremental port of changes from upstream
decolua/9router(currently at v0.4.33) into openproxy (currently at v0.4.16). Both repos share a feature set but run on different stacks (9router is Next.js+JS, openproxy is Rust BE + Astro FE), so this is a port, not a merge.This PR is opened as a draft and will be filled in incrementally over multiple commits. Each commit is a self-contained slice you can review independently. The first commit lands the security and bug fixes; subsequent commits add features.
Inventory
Commit 1 — security & bug fixes (landed)