diff options
| author | troido <troido@protonmail.com> | 2020-04-23 23:34:51 +0200 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-04-23 23:34:51 +0200 |
| commit | 71744e0d16a23acde3e743c94838dbae9af057a9 (patch) | |
| tree | 30844ae01ee5d2745ce7c2f87161c7b509992b73 /src/gameserver.rs | |
| parent | d577a3f874a3fc2cb71708f400482ca817abc33e (diff) | |
hash the password server-side too
Diffstat (limited to 'src/gameserver.rs')
| -rw-r--r-- | src/gameserver.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gameserver.rs b/src/gameserver.rs index 37b889f..4947c8d 100644 --- a/src/gameserver.rs +++ b/src/gameserver.rs @@ -209,8 +209,7 @@ impl GameServer { println!("Name mismatch: user entry for {:?} has name {}", player, user.name); return Err(merr!("server", "name mismatch")); } - if token != user.pass_token { - println!("password mismatch: '{}' '{}'", token, user.pass_token); + if !user.validate_token(&token) { return Err(merr!("invalidtoken", "invalid pass token")); } () |
