changeset 6563:42bbccdec0a0

auth: catch all exceptions while loading auth plugin - not just ImportError A third party plugin could raise any kind of exception, so we should be prepared for that.
author domruf <dominikruf@gmail.com>
date Tue, 04 Apr 2017 15:22:48 +0200
parents f58ed40c9a72
children f9b67a894e21
files kallithea/lib/auth_modules/__init__.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/auth_modules/__init__.py	Sun Apr 02 13:38:08 2017 +0200
+++ b/kallithea/lib/auth_modules/__init__.py	Tue Apr 04 15:22:48 2017 +0200
@@ -344,7 +344,7 @@
     for plugin_name in Setting.get_by_name("auth_plugins").app_settings_value:
         try:
             plugin = loadplugin(plugin_name)
-        except ImportError as e:
+        except Exception:
             log.exception('Failed to load authentication module %s' % (plugin_name))
         else:
             auth_plugins.append(plugin)