diff options
author | Mike Frysinger <vapier@google.com> | 2023-12-18 16:31:11 -0500 |
---|---|---|
committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-12-19 18:00:44 +0000 |
commit | 48e4137eba1678c40a4caa92d9148a9ade76ec90 (patch) | |
tree | 39ebfdb36d7cbebcadf81e3d3e73afa1c77eb623 /manifest_xml.py | |
parent | 172c58398b340f30bad1902aebba9d198b5786f4 (diff) | |
download | git-repo-48e4137eba1678c40a4caa92d9148a9ade76ec90.tar.gz |
manifest_xml: do not allow / before : in scp-like syntax
Since git doesn't treat these as ssh:// URIs, we shouldn't either.
Bug: https://g-issues.gerritcodereview.com/issues/40010331
Change-Id: I001f49be30395187cac447d09cb5a6c29e95768b
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/398517
Tested-by: Mike Frysinger <vapier@google.com>
Reviewed-by: Jason Chang <jasonnc@google.com>
Commit-Queue: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'manifest_xml.py')
-rw-r--r-- | manifest_xml.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/manifest_xml.py b/manifest_xml.py index edbebaa3..7e533a02 100644 --- a/manifest_xml.py +++ b/manifest_xml.py | |||
@@ -134,7 +134,7 @@ def normalize_url(url: str) -> str: | |||
134 | parsed_url = urllib.parse.urlparse(url) | 134 | parsed_url = urllib.parse.urlparse(url) |
135 | 135 | ||
136 | # This matches patterns like "git@github.com:foo/bar". | 136 | # This matches patterns like "git@github.com:foo/bar". |
137 | scp_like_url_re = r"^[^:]+@[^:]+:[^/]+/" | 137 | scp_like_url_re = r"^[^/:]+@[^/:]+:[^/]+/" |
138 | 138 | ||
139 | # If our URL is missing a schema and matches git's | 139 | # If our URL is missing a schema and matches git's |
140 | # SCP-like syntax we should convert it to a proper | 140 | # SCP-like syntax we should convert it to a proper |