fix RequestAuthProvider

Рекомендую посадить на кол автора этого шедевра!
This commit is contained in:
Egor Koleda 2019-06-20 00:55:18 +03:00 committed by GitHub
parent 8f487cad40
commit 6e1750d25c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,7 +33,7 @@ public AuthProviderResult auth(String login, String password, String ip) throws
// Match username
Matcher matcher = pattern.matcher(currentResponse);
return matcher.matches() && matcher.groupCount() >= 1 ?
new AuthProviderResult(matcher.group("username"), SecurityHelper.randomStringToken(), usePermission ? new ClientPermissions(Long.getLong(matcher.group("permission"))) : srv.config.permissionsHandler.getPermissions(login)) :
new AuthProviderResult(matcher.group("username"), SecurityHelper.randomStringToken(), usePermission ? new ClientPermissions(Long.parseLong(matcher.group("permission"))) : srv.config.permissionsHandler.getPermissions(login)) :
authError(currentResponse);
}