Skip to content

Commit adb596d

Browse files
authored
Merge pull request from GHSA-9jjr-qqfp-ppwx
Explicitly separate git-ls-remote options from positional arguments
2 parents 034430a + 195caac commit adb596d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

binderhub/repoproviders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ async def get_resolved_ref(self):
484484
self.sha1_validate(self.unresolved_ref)
485485
except ValueError:
486486
# The ref is a head/tag and we resolve it using `git ls-remote`
487-
command = ["git", "ls-remote", self.repo, self.unresolved_ref]
487+
command = ["git", "ls-remote", "--", self.repo, self.unresolved_ref]
488488
result = subprocess.run(command, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
489489
if result.returncode:
490490
raise RuntimeError("Unable to run git ls-remote to get the `resolved_ref`: {}".format(result.stderr))

0 commit comments

Comments
 (0)