summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-21 17:27:30 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-21 17:27:30 +0000
commit52deddeb7ba487e11c6ecf6ab74e52630cefd1e9 (patch)
tree8ec6e2b30bc8768eb6a1b3b4b82f44c8249848da /src
parent527c492cf1c86ede062c49d45ebda17c8c6dfc68 (diff)
Fix base64 decoding function
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12509 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/inspstring.cpp2
-rw-r--r--src/modules/m_password_hash.cpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/inspstring.cpp b/src/inspstring.cpp
index 74629bf55..3b87a3f70 100644
--- a/src/inspstring.cpp
+++ b/src/inspstring.cpp
@@ -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;
diff --git a/src/modules/m_password_hash.cpp b/src/modules/m_password_hash.cpp
index 7d2b9fc79..44e02eeda 100644
--- a/src/modules/m_password_hash.cpp
+++ b/src/modules/m_password_hash.cpp
@@ -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)