From b96594308d33747f48625475b786fa00fc3f768f Mon Sep 17 00:00:00 2001 From: Mark Samman Date: Wed, 24 Jul 2013 02:04:56 +0200 Subject: [PATCH] Fix issue #10 --- src/databasemanager.cpp | 4 ++-- src/iologindata.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/databasemanager.cpp b/src/databasemanager.cpp index d92fc27d43..eda8dbb56c 100644 --- a/src/databasemanager.cpp +++ b/src/databasemanager.cpp @@ -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; } diff --git a/src/iologindata.cpp b/src/iologindata.cpp index 5fc5c094d5..720de2f42b 100644 --- a/src/iologindata.cpp +++ b/src/iologindata.cpp @@ -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());