Issue #12: Git backend needs all URLs in commands quoted
Reported by: | Daniel Anderson |
State: | resolved |
Created on: | 2014-07-18 18:58 |
Updated on: | 2014-07-29 23:57 |
Description
clone has URL quoted, others will fail when URL contains chars needing quoting.
Attachments
Comments
Comment by Mads Kiilerich, on 2014-07-18 19:04
Please elaborate and give examples.
Comment by Daniel Anderson, on 2014-07-18 19:56
kallithea/lib/vcs/backends/git/repository.py starting at line 642 for methods clone, pull and fetch.
This is how clone builds the command:
cmd += ['--', '"%s"' % url, '"%s"' % self.path] cmd = ' '.join(cmd)
However, looking at pull:
cmd = ['pull', "--ff-only", url] cmd = ' '.join(cmd)
and fetch:
cmd = '''fetch %s -- %s''' % (url, refs)
Repo URLs with authentication in them could contain chars not accepted on the command line unquoted.
Comment by Daniel Anderson, on 2014-07-18 21:13
Simple enough fix, I just posted a pull request for this.
Comment by Mads Kiilerich, on 2014-07-29 23:57
Thanks for the patch!