summaryrefslogtreecommitdiff
path: root/lorry
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2011-10-28 15:38:53 +0100
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2011-10-28 15:38:53 +0100
commitbe989e4496606bf6709fda60f83bfebb61416784 (patch)
tree1e67bf6adee72679493cf1a76a2780991b84468e /lorry
parent1f123d8b44cd54d90d1e72294ebd99aa9b419e96 (diff)
downloadlorry-be989e4496606bf6709fda60f83bfebb61416784.tar.gz
Do not read in the whole bzr fast export
That's a good way to DoS yourself.
Diffstat (limited to 'lorry')
-rwxr-xr-xlorry5
1 files changed, 2 insertions, 3 deletions
diff --git a/lorry b/lorry
index c817e71..424f07d 100755
--- a/lorry
+++ b/lorry
@@ -88,10 +88,9 @@ class Lorry(cliapp.Application):
os.mkdir(gitdir)
self.run_program(['git', 'init', '.'], cwd=gitdir)
self.progress('.. reading fast-export data')
- with open(export) as f:
- data = f.read()
self.progress('.. fast-importing into git')
- self.run_program(['git', 'fast-import'], stdin=data, cwd=gitdir)
+ self.run_program(['sh', '-c', 'git fast-import < ../fast-import'],
+ cwd=gitdir)
def gitify_svn(self, dirname, gitdir, spec):
if not os.path.exists(gitdir):