about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2012-03-21 02:38:40 +0100
committerhut <hut@lavabit.com>2012-03-21 02:38:40 +0100
commit79c760d71f62889e85f55a5bc130a20667feb894 (patch)
tree7b1704d8e98360db49affc7912a37e3cea5e8a43
parentae6f5730ab2fafd992cc1d2f9bbae72df16fbbf9 (diff)
downloadranger-79c760d71f62889e85f55a5bc130a20667feb894.tar.gz
ext.rifle: filter out filenames containing null-byte
-rwxr-xr-xranger/ext/rifle.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ranger/ext/rifle.py b/ranger/ext/rifle.py
index 0a0b15ac..ea2a489c 100755
--- a/ranger/ext/rifle.py
+++ b/ranger/ext/rifle.py
@@ -175,7 +175,8 @@ class Rifle(object):
 		self._app_flags = squash_flags(self._app_flags)
 		flags = self._app_flags
 
-		_filenames = "' '".join(f.replace("'", "'\\\''") for f in files)
+		_filenames = "' '".join(f.replace("'", "'\\\''") for f in files
+				if "\x00" not in f)
 		command = "set -- '%s'" % _filenames + '\n'
 
 		# Apply flags