Merge pull request #69 from SengokuNadeko/master

Adjustments made to regex
This commit is contained in:
CPunch 2020-09-06 14:06:37 -05:00 committed by GitHub
commit 458843958b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -398,8 +398,8 @@ bool CNLoginServer::exitDuplicate(int accountId)
}
bool CNLoginServer::isLoginDataGood(std::string login, std::string password)
{
std::regex loginRegex("^([A-Za-z\\d_\\-]){5,20}$");
std::regex passwordRegex("^([A-Za-z\\d_\\-@$!%*#?&,.+:;<=>]){8,20}$");
std::regex loginRegex("[a-zA-Z0-9_-]{4,32}");
std::regex passwordRegex("[a-zA-Z0-9!@#$%^&*()_+]{8,32}");
return (std::regex_match(login, loginRegex) && std::regex_match(password, passwordRegex));
}
bool CNLoginServer::isPasswordCorrect(std::string actualPassword, std::string tryPassword)