summaryrefslogtreecommitdiff
path: root/src/core/cs_sendpass.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/cs_sendpass.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/cs_sendpass.c')
-rw-r--r--src/core/cs_sendpass.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/cs_sendpass.c b/src/core/cs_sendpass.c
index e61f6e2ee..8643cdeb5 100644
--- a/src/core/cs_sendpass.c
+++ b/src/core/cs_sendpass.c
@@ -103,6 +103,10 @@ class CSSendPass : public Module
if (!UseMail)
throw ModuleException("sendpass may not be loaded if UseMail is loaded");
+
+ char tmp_pass[PASSMAX];
+ if (!enc_decrypt("tmp", tmp_pass, PASSMAX - 1))
+ throw ModuleException("Incompatible with the encryption module being used");
}
};