mirror of
https://github.com/nexu-io/openmotion.git
synced 2026-12-06 23:07:33 +08:00
* feat(auth): accept any public HTTPS redirect host in MCP OAuth DCR Web-hosted MCP clients such as Doubao were rejected with 400 invalid_client_metadata because dynamic client registration only admitted a fixed list of HTTPS redirect hosts, so every new platform needed a code change and a release. - DCR accepts any public DNS HTTPS redirect host. IP literals, single-label and *.localhost hosts, fragments and userinfo stay rejected; loopback HTTP and native app schemes are unchanged. - OAUTH_DCR_ALLOWED_HTTPS_HOSTS now marks verified hosts. The consent page shows a warning naming the host when the redirect host is not verified. The same list still gates browser Origin headers on /mcp. - New OAUTH_DCR_BLOCKED_HTTPS_HOSTS rejects registration and cuts off already registered clients at authorize, code exchange and refresh. - Each DCR registration and rejection is logged with its redirect hosts. * fix(auth): reduce unverified redirect notice to one consent line Replace the multi-sentence warning block with a warning badge and the bold redirect host in the existing consent subtitle. * fix(auth): canonicalize terminal-dot redirect hosts in DCR checks URL.hostname keeps a terminal dot, so https://cb.phish.example./cb evaded OAUTH_DCR_BLOCKED_HTTPS_HOSTS and https://localhost./cb passed the public host check. Strip one terminal dot before verified, blocked and public-host matching, reject hosts with empty labels, and derive the audit log's unverified hosts from the parsed scheme so HTTPS:// spellings are counted. --------- Co-authored-by: heggria <bshengtao@gmail.com>