Replace the Figma OAuth exception with Mercado Pago (#50189)

## What changed

Allow the issuer `https://mcp.mercadopago.com/mcp` to use authorization endpoints on `https://auth.mercadopago.com` and token endpoints on `https://mcp.mercadopago.com` without issuer-bound callbacks. Remove the previous Figma exception.

## Testing

Update the provider-exception test to accept the Mercado Pago combination and reject lookalike issuer hosts, unrelated token hosts, and HTTP issuer and token URLs.

GitOrigin-RevId: 3838c7e4c32d6a2022f0011d6020e383035fe67f
This commit is contained in:
Matthew Zeng
2026-10-02 05:25:51 +00:00
committed by copyberry
parent b997c72a99
commit a20fe6335f
2 changed files with 14 additions and 14 deletions
@@ -50,9 +50,9 @@ pub(crate) fn validate_authorization_server_endpoints(
token_endpoint.origin().ascii_serialization().as_str(),
),
(
"https://api.figma.com/",
"https://www.figma.com",
"https://api.figma.com",
"https://mcp.mercadopago.com/mcp",
"https://auth.mercadopago.com",
"https://mcp.mercadopago.com",
) | (
"https://agent.robinhood.com/mcp/trading",
"https://robinhood.com",
@@ -243,9 +243,9 @@ async fn registration_selection_preserves_dcr_capabilities_and_exact_redirects()
fn legacy_provider_exceptions_require_exact_issuer_and_endpoint_origins() -> Result<()> {
for (issuer, authorization_endpoint, token_endpoint, accepted) in [
(
"https://api.figma.com",
"https://www.figma.com/oauth/mcp",
"https://api.figma.com/v1/oauth/token",
"https://mcp.mercadopago.com/mcp",
"https://auth.mercadopago.com/mcp/authorization",
"https://mcp.mercadopago.com/oauth/token",
true,
),
(
@@ -255,21 +255,21 @@ fn legacy_provider_exceptions_require_exact_issuer_and_endpoint_origins() -> Res
true,
),
(
"https://api.figma.com.attacker.example",
"https://www.figma.com/oauth/mcp",
"https://api.figma.com.attacker.example/token",
"https://mcp.mercadopago.com.attacker.example/mcp",
"https://auth.mercadopago.com/mcp/authorization",
"https://mcp.mercadopago.com.attacker.example/oauth/token",
false,
),
(
"https://api.figma.com",
"https://www.figma.com/oauth/mcp",
"https://mcp.mercadopago.com/mcp",
"https://auth.mercadopago.com/mcp/authorization",
"https://attacker.example/token",
false,
),
(
"http://api.figma.com",
"https://www.figma.com/oauth/mcp",
"http://api.figma.com/v1/oauth/token",
"http://mcp.mercadopago.com/mcp",
"https://auth.mercadopago.com/mcp/authorization",
"http://mcp.mercadopago.com/oauth/token",
false,
),
(