Skip to content

restrict url schemes allowed in oauth metadata #877

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

pcarleton
Copy link
Member

@pcarleton pcarleton commented Aug 14, 2025

Motivation and Context

See #841 (cc @arjunkmrm )

Since authorization_url is often opened in a browser, we don't want it to be javascript.

How Has This Been Tested?

Added tests

Breaking Changes

No

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@pcarleton pcarleton requested a review from a team as a code owner August 14, 2025 14:01
@pcarleton pcarleton requested a review from ochafik August 14, 2025 14:01
pcarleton and others added 2 commits August 15, 2025 09:49
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@pcarleton
Copy link
Member Author

@claude can you fix this in the tests:

   expect(received).toThrow(expected)

    Expected substring: "URL cannot use javascript: scheme"
    Received message:   "[
      {
        \"code\": \"custom\",
        \"message\": \"URL cannot use javascript:, data:, or vbscript: scheme\",
        \"path\": [
          \"redirect_uris\",
          0
        ]
      }
    ]"

Updated test expectations to match the new error message that includes
javascript:, data:, and vbscript: schemes in the validation error.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant