|
@@ -73,7 +73,9 @@ bool UserManager::deleteUser(const std::string &name, const std::string &pw) {
|
|
if (it == user_map.end()) {
|
|
if (it == user_map.end()) {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
- if (it->second.compare(pw) != 0) {
|
|
|
|
|
|
+
|
|
|
|
+ std::string hash = it->second;
|
|
|
|
+ if (bcrypt_checkpw(pw.c_str(), hash.c_str()) != 0) {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
user_map.erase(it);
|
|
user_map.erase(it);
|