summaryrefslogtreecommitdiff
path: root/src/core/ns_getpass.c
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-03-09 02:35:59 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-03-09 02:35:59 +0000
commit4ddc1cebd1b29b76ea78ee6c080ceebe9d83a513 (patch)
tree6f6c4e9c56cbe4766a552637e8fa6b88ee281b51 /src/core/ns_getpass.c
parent54762245b84519c5f2d805d6c4e9bf735895da78 (diff)
Fix bug #1028, the *_getpass and *_sendpass modules will now refuse to load if the given encryption module is unable to do decryption.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2147 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/core/ns_getpass.c')
-rw-r--r--src/core/ns_getpass.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/ns_getpass.c b/src/core/ns_getpass.c
index 05373cedb..34bbd3137 100644
--- a/src/core/ns_getpass.c
+++ b/src/core/ns_getpass.c
@@ -91,6 +91,10 @@ class NSGetPass : public Module
this->AddCommand(NICKSERV, new CommandNSGetPass(), MOD_UNIQUE);
this->SetNickHelp(myNickServHelp);
+
+ char tmp_pass[PASSMAX];
+ if (!enc_decrypt("tmp", tmp_pass, PASSMAX - 1))
+ throw ModuleException("Incompatible with the encryption module being used");
}
};