Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

revrsefr
Copy link
Contributor

No description provided.

}
};

class CheckIPQuery : public SQL::Query
Copy link
Member

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;
Copy link
Member

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;
Copy link
Member

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);
Copy link
Member

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.

@revrsefr revrsefr closed this Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants