Bug 913082 - Strip out more dangerous characters from patch names, r=jdm
authorSteve Fink <sfink@mozilla.com>
Thu, 05 Sep 2013 10:41:06 -0700
changeset 77 9fec7d31e8d5
parent 76 db8bbbde5cbb
child 78 9c5006e8d531
push id58
push usersfink@mozilla.com
push dateThu, 05 Sep 2013 17:41:29 +0000
reviewersjdm
bugs913082
Bug 913082 - Strip out more dangerous characters from patch names, r=jdm
bz.py
--- a/bz.py
+++ b/bz.py
@@ -182,17 +182,17 @@ class Patch(Attachment):
       patchname = self.bug.settings.patch_format % self.metadata
     else:
       # Use filename from bug attachment.
       patchname = self.filename
 
     # The patch name might have some illegal characters so we need to scrub those
     replacements = {
       '_' : [' ', ':'],
-      '' : ['"', "'", '<', '>', '*']
+      '' : ['"', "'", '<', '>', '[', ']', '(', ')', '*']
     }
     for replacement, items in replacements.items():
       for char in items:
         patchname = patchname.replace(char, replacement)
 
     return patchname
 
   def joinFlags(self, commitfmt=True):