Skip to content

Commit

Permalink
Change possibly problematic use of extended initialization syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
loonycyborg committed Feb 12, 2018
1 parent a9bfb8f commit 8523871
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/game_initialization/multiplayer.cpp
Expand Up @@ -276,8 +276,8 @@ std::pair<wesnothd_connection_ptr, config> open_connection(std::string host)
utils::md5::get_iteration_count(salt)).base64_digest(), salt.substr(12, 8)).base64_digest();
} else if(utils::bcrypt::is_valid_prefix(salt)) {
try {
auto bcrypt_salt { utils::bcrypt::from_salted_salt(salt) };
auto hash { utils::bcrypt::hash_pw(password, bcrypt_salt) };
auto bcrypt_salt = utils::bcrypt::from_salted_salt(salt);
auto hash = utils::bcrypt::hash_pw(password, bcrypt_salt);
std::string outer_salt = salt.substr(bcrypt_salt.iteration_count_delim_pos + 23, 8);
if(outer_salt.size() != 8)
throw utils::hash_error("salt too small");
Expand Down

0 comments on commit 8523871

Please sign in to comment.