rust/hedgewars-server/src/server/database.rs
changeset 15163 bcb98009ad39
parent 15121 1a43b570cbe4
child 15517 abd5eb807166
equal deleted inserted replaced
15162:7416f6319de9 15163:bcb98009ad39
    67                     from_row_opt::<(String, i32, i32)>(row)?;
    67                     from_row_opt::<(String, i32, i32)>(row)?;
    68                 let client_hash = get_hash(protocol, &password, &client_salt, &server_salt);
    68                 let client_hash = get_hash(protocol, &password, &client_salt, &server_salt);
    69                 let server_hash = get_hash(protocol, &password, &server_salt, &client_salt);
    69                 let server_hash = get_hash(protocol, &password, &server_salt, &client_salt);
    70                 password.replace_range(.., "🦔🦔🦔🦔🦔🦔🦔🦔");
    70                 password.replace_range(.., "🦔🦔🦔🦔🦔🦔🦔🦔");
    71 
    71 
    72                 if password_hash == format!("{:x}", client_hash) {
    72                 if client_hash == password_hash {
    73                     Ok(Some(AccountInfo {
    73                     Ok(Some(AccountInfo {
    74                         is_registered: true,
    74                         is_registered: true,
    75                         is_admin: is_admin == 1,
    75                         is_admin: is_admin == 1,
    76                         is_contributor: is_contributor == 1,
    76                         is_contributor: is_contributor == 1,
    77                         server_hash,
    77                         server_hash,