diff options
author | DukePyrolator <DukePyrolator@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-01-09 08:49:00 +0000 |
---|---|---|
committer | DukePyrolator <DukePyrolator@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-01-09 08:49:00 +0000 |
commit | 5e62e8f22e94c975159e1800732cb2740c18d50b (patch) | |
tree | f3551b11b8a21f36afa8f5d8b594536e4ccc7b9c /src/core/db_plain.cpp | |
parent | a4b015b39d0e232121e060466a979277f0f28ce2 (diff) |
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
Diffstat (limited to 'src/core/db_plain.cpp')
-rw-r--r-- | src/core/db_plain.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/core/db_plain.cpp b/src/core/db_plain.cpp index 5cc6ab42b..3d220516c 100644 --- a/src/core/db_plain.cpp +++ b/src/core/db_plain.cpp @@ -388,12 +388,7 @@ static void LoadNickCore(const std::vector<std::string> ¶ms) 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) |