mirror of
https://github.com/array-in-a-matrix/brainwine.git
synced 2025-04-02 11:11:58 -04:00
Null check on auth token verification
This commit is contained in:
parent
791476d6d5
commit
a95a1c7222
1 changed files with 4 additions and 0 deletions
|
@ -127,6 +127,10 @@ public class PlayerManager {
|
|||
public boolean verifyAuthToken(String name, String authToken) {
|
||||
Player player = getPlayer(name);
|
||||
|
||||
if(player == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Might not be very efficient...
|
||||
for(String hashedToken : player.getAuthTokens()) {
|
||||
if(BCrypt.checkpw(authToken, hashedToken)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue