summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-10-02 19:28:02 +0200
committerhut <hut@lavabit.com>2011-10-02 19:28:02 +0200
commit4a04a9530d77c78c3574bb8b320f7ea3f163b13f (patch)
tree7c175019e2b8c739b4d03fe322d0d3f2a69b1ee6
parentf7894a1583f82e1ba97d0aefcbc19cf1bf1fc936 (diff)
downloadranger-4a04a9530d77c78c3574bb8b320f7ea3f163b13f.tar.gz
core.actions: sanitize input of {set,enter,unset}_bookmark
-rw-r--r--ranger/core/actions.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index 15e6dd74..0dd7686c 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -516,10 +516,10 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
 		"""Enter the bookmark with the name <key>"""
 		try:
 			self.bookmarks.update_if_outdated()
-			destination = self.bookmarks[key]
+			destination = self.bookmarks[str(key)]
 			cwd = self.env.cwd
 			if destination.path != cwd.path:
-				self.bookmarks.enter(key)
+				self.bookmarks.enter(str(key))
 				self.bookmarks.remember(cwd)
 		except KeyError:
 			pass
@@ -527,12 +527,12 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
 	def set_bookmark(self, key):
 		"""Set the bookmark with the name <key> to the current directory"""
 		self.bookmarks.update_if_outdated()
-		self.bookmarks[key] = self.env.cwd
+		self.bookmarks[str(key)] = self.env.cwd
 
 	def unset_bookmark(self, key):
 		"""Delete the bookmark with the name <key>"""
 		self.bookmarks.update_if_outdated()
-		self.bookmarks.delete(key)
+		self.bookmarks.delete(str(key))
 
 	def draw_bookmarks(self):
 		self.ui.browser.draw_bookmarks = True
mail.com> 2013-02-02 20:22:39 +0000 Removed iq functions from xmpp.h' href='/danisanti/profani-tty/commit/src/xmpp/iq.h?id=5e3d414ee06f19fc623097393976f3a672008267'>5e3d414e ^
a2726b6a ^

88f423af ^
aabe3aff ^
a2726b6a ^








5e3d414e ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53