mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-04 22:40:05 +00:00
Small regex fix
Old regex had some problems (a bit too restrictive). If you want, you can push this to loosen up the restrictions a little.
This commit is contained in:
parent
e936cb9fac
commit
3876e0537e
@ -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]$)[A-Za-z][A-Za-z\d.-]{3,20}$");
|
||||
std::regex passwordRegex("^(?=.*[A-Za-z0-9]$)[A-Za-z][A-Za-z\d.-]{3,20}$");
|
||||
return (std::regex_match(login, loginRegex) && std::regex_match(password, passwordRegex));
|
||||
}
|
||||
bool CNLoginServer::isPasswordCorrect(std::string actualPassword, std::string tryPassword)
|
||||
|
Loading…
Reference in New Issue
Block a user