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

double hook invocation #3374

Open
celesteking opened this issue May 31, 2024 · 0 comments
Open

double hook invocation #3374

celesteking opened this issue May 31, 2024 · 0 comments

Comments

@celesteking
Copy link
Contributor

Assume there's a plugin that's hooking up connect and returning DENY.
Assume there's a second plugin that tarpits quit.

Then, connect hook would switch connection.state into LOOP.
Client would send QUIT once, then would send another QUIT while there's a tarpit active, which will lead to double hook invocation and a crash.

    connect_respond (retval, msg) {
            case constants.deny:
                this.loop_respond(554, msg || "Your mail is not welcome here");
                break;
// --snip--
    loop_respond (code, msg) {
        if (this.state >= states.DISCONNECTING) return;
        this.state = states.LOOP;
// --snip--
     else if (this.state === states.LOOP) {
            // Allow QUIT
            if (this.current_line.toUpperCase() === 'QUIT') {
                this.cmd_quit();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant