aboutsummaryrefslogtreecommitdiff
path: root/bzr.rb
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-06-08 13:03:46 +0200
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-06-08 13:03:46 +0200
commit811e920e22d698678b01c3465b285731e5f67273 (patch)
tree81a5859f2aa25cea3c063ba32e0793424c3c363c /bzr.rb
parent413a69a8cb7ab9f1b29dd2785aa8079602547e56 (diff)
better approch for fixing the remote shell exploit
Diffstat (limited to 'bzr.rb')
-rw-r--r--bzr.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/bzr.rb b/bzr.rb
index c3f4190..2796e6c 100644
--- a/bzr.rb
+++ b/bzr.rb
@@ -21,6 +21,12 @@ class VCS
end
def VCS.commit comment
- `#{BZRCMD} commit -m \"#{comment}\"`
+ tmpfile = "/tmp/commitcomment.#{rand(10000)}"
+ File.open(tmpfile,"w"){|f|
+ f<<comment
+ }
+ ret = `#{BZRCMD} commit -F #{tmpfile}`
+ File.delete(tmpfile)
+ ret
end
end