fix(mcp): accept only http and https OAuth URLs

A malicious MCP server could supply a file: or custom protocol
authorization endpoint, which sign-in passed to the platform URL handler.
This commit is contained in:
Armin Ronacher 2026-10-23 12:19:41 +02:00
parent e3bc05e871
commit 9ffd27cfaa
5 changed files with 54 additions and 3 deletions

View file

@ -6,6 +6,10 @@
- `pi update` for installs from the pi.dev installer no longer passes `--min-release-age=0` to `npm ci`. The release lockfile pins every package, so the flag had no effect, and security scanners that block it stopped the update ([#11262](https://github.com/earendil-works/pi/issues/11262))
### Fixed
- MCP sign-in now rejects authorization endpoints and other OAuth metadata URLs that are not `http:` or `https:`. Before, a malicious MCP server could supply a `file:` or custom protocol URL, which pi passed to the platform URL handler.
## [1.4.0] - 2026-10-21
### New Features