-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
remove % from forbidden characters in git URLs #6962
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
base: next
Are you sure you want to change the base?
Conversation
v4.0.0-beta.435
v4.0.0-beta.436
v4.0.0-beta.437
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.
Pull Request Overview
This PR allows percent-encoded characters (like %20 for spaces) in git repository URLs to support Azure DevOps repositories. The change removes % from the list of forbidden characters and adds validation to ensure any percent signs are part of valid percent-encoding sequences.
- Removed
%from the dangerous characters array to allow percent-encoded URLs - Updated SSH URL validation regex to allow
%characters in the path portion - Added validation to ensure percent signs are only used in valid percent-encoding format (e.g.,
%20)
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| return; | ||
| } | ||
|
|
||
| // Ensure any percent signs are valid percent-encodings like %20 |
Copilot
AI
Oct 22, 2025
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.
The variable $path is not defined in this scope. For SSH URLs, you need to extract the path portion from $value before validating percent-encoding. Consider extracting the path after the colon character using explode(':', $value, 2)[1] ?? ''.
| // Ensure any percent signs are valid percent-encodings like %20 | |
| // Ensure any percent signs are valid percent-encodings like %20 | |
| $path = explode(':', $value, 2)[1] ?? ''; |
Changes
devops uses %20 in repository URLs, and I would like to deploy from devops