From d0a50222e7726867ed49886f5576becc6f217e4f Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 27 Aug 2009 03:55:17 +0200 Subject: AuthBackendFile: Keine schwachen Hashes erlauben --- src/modules/AuthBackendFile/AuthBackendFile.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/modules/AuthBackendFile/AuthBackendFile.h b/src/modules/AuthBackendFile/AuthBackendFile.h index 5f13b51..8098817 100644 --- a/src/modules/AuthBackendFile/AuthBackendFile.h +++ b/src/modules/AuthBackendFile/AuthBackendFile.h @@ -71,9 +71,14 @@ class MAD_MODULE_EXPORT AuthBackendFile : public Common::AuthBackend, private Co boost::shared_ptr context) throw(Core::Exception); public: - AuthBackendFile(Common::Application *application0) : application(application0), subMethods(Common::Hash::getHashList()) { + AuthBackendFile(Common::Application *application0) : application(application0) { methods.push_back("Password"); - subMethods.push_back("Clear"); + + const std::vector &hashList = Common::Hash::getHashList(); + if(hashList.empty()) + subMethods.push_back("Clear"); + else + subMethods.push_back(hashList.front()); application->getConfigManager()->registerConfigurable(this); } -- cgit v1.2.3