summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-08-27 03:55:17 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-08-27 03:55:17 +0200
commitd0a50222e7726867ed49886f5576becc6f217e4f (patch)
tree40c4d5d3e2fc619a13beb5f0501cd85acbd643f2 /src
parentc9a0accf145e403496ad84729a10735ef79f55de (diff)
downloadmad-d0a50222e7726867ed49886f5576becc6f217e4f.tar
mad-d0a50222e7726867ed49886f5576becc6f217e4f.zip
AuthBackendFile: Keine schwachen Hashes erlauben
Diffstat (limited to 'src')
-rw-r--r--src/modules/AuthBackendFile/AuthBackendFile.h9
1 files 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<Common::AuthContext> 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<std::string> &hashList = Common::Hash::getHashList();
+ if(hashList.empty())
+ subMethods.push_back("Clear");
+ else
+ subMethods.push_back(hashList.front());
application->getConfigManager()->registerConfigurable(this);
}