OpenFusionProject/OpenFusion

Regex pattern check causing login error

Eperty123 opened this issue · 3 comments

The new regex patterns:

std::regex loginRegex("[a-zA-Z0-9_-]{4,32}");
std::regex passwordRegex("[a-zA-Z0-9!@#$%^&*()_+]{8,32}");

give off "Login Error" from the client when logging in. I'm not the biggest regex expert but there seems to be a strict rule for some letter combinations. Using the older patterns fixed the issue however:

std::regex loginRegex("^([A-Za-z\\d_\\-]){5,32}$");
std::regex passwordRegex("^([A-Za-z\\d_\\-@$!%*#?&,.+:;<=>]){8,32}$");

I believe this is what some of the affected players have been experiencing.

Have you tried this on the latest commit? There was an issue with bad cookie data causing a lot of login errors that should have been fixed in fe370df. This could very well be a factor though.

Have you tried this on the latest commit? There was an issue with bad cookie data causing a lot of login errors that should have been fixed in fe370df. This could very well be a factor though.

I sure did. Made sure I fetched all the latest commits.

Should be fixed? Haven't had a login error for a long time.