From 73df006390dbab194cb6d0204999fcf2d0487159 Mon Sep 17 00:00:00 2001 From: lars Date: Wed, 17 Jan 2007 22:15:35 +0000 Subject: [PATCH] prevent potential recusion in plugin 'volume_props' fixed serving of fallback icon for plugins --- debian/changelog | 7 +++---- plugins/volume_props/volume_props.py | 3 +++ src/cryptobox/plugins/base.py | 6 ++++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index 29eb707..8397df8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,8 @@ -cryptobox (0.3.2-1) unstable; urgency=low +cryptobox (0.3.3-1) unstable; urgency=low - * improve robustness of startup-script - * fix non-writeable-settings-location problems + * new upstream release - -- Lars Kruse Fri, 5 Jan 2007 02:20:55 +0100 + -- Lars Kruse Mon, 8 Jan 2007 06:15:20 +0100 cryptobox (0.3.1-1) unstable; urgency=low diff --git a/plugins/volume_props/volume_props.py b/plugins/volume_props/volume_props.py index 73d051e..e3d63b8 100644 --- a/plugins/volume_props/volume_props.py +++ b/plugins/volume_props/volume_props.py @@ -47,6 +47,9 @@ class volume_props(cryptobox.plugins.base.CryptoBoxPlugin): ## (e.g. chpasswd for plain containers) if not p.is_useful(self.device): continue + ## prevent recursion + if p.get_name() == self.get_name(): + continue p.device = self.device plfname = os.path.join(p.plugin_dir, str(p.do_action(**args)) + ".cs") #load_string += "
" \ diff --git a/src/cryptobox/plugins/base.py b/src/cryptobox/plugins/base.py index 736b864..a632231 100644 --- a/src/cryptobox/plugins/base.py +++ b/src/cryptobox/plugins/base.py @@ -114,8 +114,10 @@ class CryptoBoxPlugin: else: plugin_icon_file = os.path.join(self.plugin_dir, image) if not os.access(plugin_icon_file, os.R_OK): - plugin_icon_file = os.path.join( - self.cbox.prefs["Locations"]["PluginDir"], self.fallback_icon_filename) + for ppath in self.cbox.prefs["Locations"]["PluginDir"]: + plugin_icon_file = os.path.join(ppath, self.fallback_icon_filename) + if plugin_icon_file: + break return cherrypy.lib.cptools.serveFile(plugin_icon_file)