1
0
mirror of https://github.com/anope/anope.git synced 2026-07-04 16:53:16 +02:00

changed all password fields to std::string and reworked the way how the enc modules handle the passwords

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2740 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
DukePyrolator
2010-01-09 08:49:00 +00:00
parent a4b015b39d
commit 5e62e8f22e
22 changed files with 212 additions and 303 deletions
+2 -10
View File
@@ -388,12 +388,7 @@ static void LoadNickCore(const std::vector<std::string> &params)
return;
}
size_t tmp = params[1].find(':'); // XXX till we store the hash method internally with the nickcore
const char *pass = params[1].c_str() + tmp + 1;
char passbuf[PASSMAX];
memset(&passbuf, 0, sizeof(passbuf));
b64_decode(pass, passbuf, PASSMAX);
strscpy(nc->pass, passbuf, PASSMAX);
nc->pass.assign(params[1]);
for (int i = 0; LangInfos[i].LanguageId != -1; ++i)
if (params[2] == LangInfos[i].Name)
@@ -854,10 +849,7 @@ class DBPlain : public Module
}
else
{
//XXX forced plain till we store hashm in pw
char temppass[5000];
b64_encode(nc->pass, strlen(nc->pass), temppass, 5000);
db << "NC " << nc->display << " plain:" << temppass << " ";
db << "NC " << nc->display << " " << nc->pass << " ";
}
for (j = 0; LangInfos[j].LanguageId != -1; ++j)
if (nc->language == LangInfos[j].LanguageId)