Unverified Commit 48ec3e9f authored by Mike Perry's avatar Mike Perry Committed by boklm
Browse files

Allow '@' and '+' in sanitized strings.

Firefox needs to use '@' for extension filenames, and '+' is needed for g++
cross-compiler wrapper scripts.
parent feb68362
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -22,12 +22,12 @@ def system!(cmd)
end

def sanitize(str, where)
  raise "unsanitary string in #{where}" if (str =~ /[^\w.-]/)
  raise "unsanitary char in #{str}" if (str =~ /[^\w@._+-]/)
  str
end

def sanitize_path(str, where)
  raise "unsanitary string in #{where}" if (str =~ /[^@\w\/.:+-]/)
  raise "unsanitary string in #{where}" if (str =~ /[^@\w\/.:+-{}]/)
  str
end