From 3f45131e58dd85c0688b20838256a60f4eda9849 Mon Sep 17 00:00:00 2001 From: psychon Date: Sun, 17 Feb 2008 12:23:26 +0000 Subject: [PATCH] autoop: Don't answer on too short challenges Thanks to SilverLeo for this patch. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@960 726aef4b-f618-498e-8847-2d620e286838 --- modules/autoop.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/autoop.cpp b/modules/autoop.cpp index afb11673..00343730 100644 --- a/modules/autoop.cpp +++ b/modules/autoop.cpp @@ -431,6 +431,11 @@ public: return false; } + if (sChallenge.length() != 32) { + PutModule("WARNING! [" + Nick.GetHostMask() + "] sent an invalid challenge."); + return false; + } + CString sResponse = pUser->GetUserKey() + "::" + sChallenge; PutIRC("NOTICE " + Nick.GetNick() + " :!ZNCAO RESPONSE " + sResponse.MD5()); return false;