diff --git a/src/main.cpp b/src/main.cpp index f9ac6c6..00d65c9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -414,7 +414,7 @@ int main(int argc, char *argv[]) { ID_UPDATE_FREELANCER_PASSWORD_HASH }); pqxx::result freelancerEmail = Database::executePreparedStatement_SELECT_FREELANCER_EMAIL_FROM_PASSWORD_RESET_KEY(databaseConnection, passwordResetKey); - if (!freelancerEmail.empty() && !password.empty() && password.compare(passwordConfirmation) != 0) { + if (!freelancerEmail.empty() && !password.empty() && password == passwordConfirmation) { string email = freelancerEmail.at(0).at(0).c_str(); pqxx::result keyExpiration = Database::executePreparedStatement_SELECT_CHECK_FREELANCER_RESET_KEY_EXPIRED(databaseConnection, email); if (stoi(keyExpiration.at(0).at(0).c_str()) == 0) { @@ -445,7 +445,7 @@ int main(int argc, char *argv[]) { ctx[MUSTACHE_PASSWORD_EMPTY] = true; if (freelancerEmail.empty()) ctx[MUSTACHE_PASSWORD_RESET_DOES_NOT_EXIST] = true; - if (password.compare(passwordConfirmation) != 0) + if (password != passwordConfirmation) ctx[MUSTACHE_PASSWORD_RESET_PASS_CONFIRMATION] = true; } auto page = crow::mustache::load(TEMPLATE_PASSWORD_RESET_FULFILMENT);