Skip to content

Commit

Permalink
Fix issue #10
Browse files Browse the repository at this point in the history
  • Loading branch information
marksamman committed Jul 24, 2013
1 parent ef26a8f commit b965943
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/databasemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,13 +519,13 @@ void DatabaseManager::checkEncryption()

switch (currentValue) {
case PASSWORD_TYPE_MD5: {
Database::getInstance()->executeQuery("UPDATE `accounts` SET `password` = MD5(`password`), `key` = MD5(`key`)");
Database::getInstance()->executeQuery("UPDATE `accounts` SET `password` = MD5(`password`)");
std::cout << "> Password type has been updated to MD5." << std::endl;
break;
}

case PASSWORD_TYPE_SHA1: {
Database::getInstance()->executeQuery("UPDATE `accounts` SET `password` = SHA1(`password`), `key` = SHA1(`key`)");
Database::getInstance()->executeQuery("UPDATE `accounts` SET `password` = SHA1(`password`)");
std::cout << "> Password type has been updated to SHA1." << std::endl;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/iologindata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Account IOLoginData::loadAccount(const std::string& name)
Account account;

std::ostringstream query;
query << "SELECT `id`, `name`, `password`, `type`, `premdays`, `lastday`, `key`, `warnings` FROM `accounts` WHERE `name` = " << db->escapeString(name);
query << "SELECT `id`, `name`, `password`, `type`, `premdays`, `lastday`, `warnings` FROM `accounts` WHERE `name` = " << db->escapeString(name);

DBResult* result = db->storeQuery(query.str());

Expand Down

0 comments on commit b965943

Please sign in to comment.