-
Notifications
You must be signed in to change notification settings - Fork 271
Fix URL processing in InternalLoad method #2487
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
Conversation
Updated URL prefix checks to include colons for "http:" and "https:". Improved handling of file URLs by adding a check for the "file:" prefix to extract the local path. Adjusted format extraction logic to work with the new file name variable.
@microsoft-github-policy-service agree |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution!
This reverts commit 287abcc.
…on is thrown instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for making the changes!
if (url.StartsWith("file:", StringComparison.OrdinalIgnoreCase)) | ||
{ | ||
fileName = new Uri(url).LocalPath; | ||
} | ||
else | ||
{ | ||
fileName = url; | ||
} |
Check notice
Code scanning / CodeQL
Missed ternary opportunity Note
fix: Allow file scheme URLs for Load
Strengthens checks of URI scheme and adjusts behavior to support file scheme. Falls back to pre-existing behavior otherwise