-
-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add new module Google reCAPTCHA V2 #284
Conversation
} | ||
}; | ||
|
||
class CheckIPQuery : public SQL::Query |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Broken indentation.
{ | ||
private: | ||
ModuleCaptchaCheck* parent; | ||
User* user; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the user disconnects before the query completes then this will result in a use after free. You should store the UUID In the class and then call ServerInstance->Users.FindUUID
to look up the user.
{ | ||
private: | ||
ModuleCaptchaCheck* parent; | ||
User* user; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same use after free here.
|
||
void OnUserPostInit(LocalUser* user) override | ||
{ | ||
const std::string* status = captcha_success.Get(user); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't actually set anywhere? Also, you could use BoolExtItem here to reduce memory.
No description provided.