diff options
Diffstat (limited to 'modules/encryption/enc_sha256.cpp')
-rw-r--r-- | modules/encryption/enc_sha256.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/encryption/enc_sha256.cpp b/modules/encryption/enc_sha256.cpp index 155cfe1f0..b9580cd7f 100644 --- a/modules/encryption/enc_sha256.cpp +++ b/modules/encryption/enc_sha256.cpp @@ -278,8 +278,6 @@ public: ESHA256(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION | VENDOR), sha256provider(this) { - - use_iv = false; } @@ -324,10 +322,10 @@ public: this->OnEncrypt(req->GetPassword(), buf); if (nc->pass.equals_cs(buf)) { - /* if we are NOT the first module in the list, + /* if we are NOT the first module in the list or we are using a default IV * we want to re-encrypt the pass with the new encryption */ - if (ModuleManager::FindFirstOf(ENCRYPTION) != this) + if (ModuleManager::FindFirstOf(ENCRYPTION) != this || !memcmp(iv, sha256_h0, 8)) Anope::Encrypt(req->GetPassword(), nc->pass); req->Success(this); } |