Skip to content

ExternalDocs URL ignored due to incorrect protocol handling in getSanitizedUrl. Fix #303#1

Open
gdec31 wants to merge 1 commit into
release/2.4from
ExternalDocsUrl
Open

ExternalDocs URL ignored due to incorrect protocol handling in getSanitizedUrl. Fix #303#1
gdec31 wants to merge 1 commit into
release/2.4from
ExternalDocsUrl

Conversation

@gdec31

@gdec31 gdec31 commented Jun 15, 2026

Copy link
Copy Markdown
Owner

@gdec31 gdec31 self-assigned this Jun 15, 2026
@gdec31 gdec31 added the bug Something isn't working label Jun 15, 2026

@avinashkamat48 avinashkamat48 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the URL.protocol comparison, but there is no regression test protecting the colon behavior. A small test that accepts https://... / http://... externalDocs URLs and rejects a non-HTTP scheme like javascript: or mailto: would make this bug much harder to reintroduce. The old implementation would fail the positive case because URL.protocol includes the trailing colon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ExternalDocs URL ignored due to incorrect protocol handling in getSanitizedUrl

3 participants