summaryrefslogtreecommitdiff
path: root/src/core/enc_none.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/enc_none.c')
-rw-r--r--src/core/enc_none.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/core/enc_none.c b/src/core/enc_none.c
index 91784bca4..99b3e17a4 100644
--- a/src/core/enc_none.c
+++ b/src/core/enc_none.c
@@ -56,12 +56,20 @@ class ENone : public Module
return EVENT_ALLOW;
}
- EventReturn OnCheckPassword(const char *plaintext, const char *password) {
+ EventReturn OnCheckPassword(const char *plaintext, char *password)
+ {
if(strcmp(plaintext,password)==0)
{
+ /* if we are NOT the first module in the list,
+ * we want to re-encrypt the pass with the new encryption
+ */
+ if (stricmp(EncModuleList[0], this->name.c_str()))
+ {
+ enc_encrypt(plaintext, strlen(password), password, PASSMAX -1 );
+ }
return EVENT_ALLOW;
}
- return EVENT_STOP;
+ return EVENT_CONTINUE;
}
};