]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix base64 decoding function
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 21 Feb 2010 17:27:30 +0000 (17:27 +0000)
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 21 Feb 2010 17:27:30 +0000 (17:27 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12509 e03df62e-2008-0410-955e-edbf42e46eb7

src/inspstring.cpp
src/modules/m_password_hash.cpp

index 74629bf5561de7c5945466d2e7f88c1332b05a90..3b87a3f70808451658a013e751fa45fe55aa5392 100644 (file)
@@ -212,7 +212,7 @@ std::string Base64ToBin(const std::string& data_str, const char* table)
        std::string rv;
        while (ok)
        {
-               const char* find = strchr(table, *data);
+               const char* find = strchr(table, *data++);
                ok = (find && find < table + 64);
                buffer = (buffer << 6) | (ok ? find - table : 0);
                bitcount += 6;
index 7d2b9fc79b016cf7c395af62c828cc95c01eebd3..44e02eeda8b07368eb15c40ea017d94e476e374c 100644 (file)
@@ -44,6 +44,7 @@ class CommandMkpasswd : public Command
 
                        user->WriteServ("NOTICE %s :%s hashed password for %s is %s",
                                user->nick.c_str(), algo.c_str(), stuff.c_str(), str.c_str());
+                       return;
                }
                HashProvider* hp = ServerInstance->Modules->FindDataService<HashProvider>("hash/" + algo);
                if (hp)