Reject scp-form remote URLs with a stray colon in the path #89
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/remote-scp-colon-owner"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The scp-form remote parser (`git@host:owner/name`) splits on the first colon, so a URL carrying an extra colon, for example `git@host:2222:owner/name` (a port mistakenly placed in scp syntax), silently parsed `owner` as `2222:owner`. `fj` would then operate against the wrong repository path instead of reporting the URL as malformed, which is dangerous for any write command.
A real owner or name never contains a colon, so reject one in `split_path`. Adds a regression test for the multi-colon scp case.