Git backend needs all URLs in commands quoted

Issue #12 resolved
Daniel Anderson created an issue

clone has URL quoted, others will fail when URL contains chars needing quoting.

Comments (4)

  1. Daniel Anderson reporter

    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.

  2. Log in to comment