mirror of
https://github.com/znc/znc.git
synced 2026-06-29 22:41:39 +02:00
Fix some more unsafe substr() calls
All of these require at least a valid login to znc to cause a std::out_of_range exceptions, some might not even be exploitable! git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2095 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+1
-1
@@ -400,7 +400,7 @@ private:
|
||||
CBlowfish c(m_sPassword, BF_DECRYPT);
|
||||
sBuffer = c.Crypt(sFile);
|
||||
|
||||
if (sBuffer.substr(0, strlen(CRYPT_VERIFICATION_TOKEN)) != CRYPT_VERIFICATION_TOKEN)
|
||||
if (sBuffer.Left(strlen(CRYPT_VERIFICATION_TOKEN)) != CRYPT_VERIFICATION_TOKEN)
|
||||
{
|
||||
// failed to decode :(
|
||||
PutModule("Unable to decode Encrypted messages");
|
||||
|
||||
Reference in New Issue
Block a user