From 7649520f63ff88d0aef5481f5aebd3030bd07462 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Mon, 23 Oct 2023 19:02:03 +0200 Subject: [PATCH] Fix HOOKTYPE_IS_HANDSHAKE_FINISHED not called at two places where register_user() is called. --- src/modules/authprompt.c | 2 +- src/modules/cap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/authprompt.c b/src/modules/authprompt.c index 611ea58b0..83c96594a 100644 --- a/src/modules/authprompt.c +++ b/src/modules/authprompt.c @@ -483,7 +483,7 @@ int authprompt_sasl_result(Client *client, int success) } /* Authentication was a success */ - if (*client->name && client->user && *client->user->username && IsNotSpoof(client)) + if (is_handshake_finished(client)) { register_user(client); /* User MAY be killed now. But since we 'return 1' below, it's safe */ diff --git a/src/modules/cap.c b/src/modules/cap.c index 08ffe5e31..0b4a5d01c 100644 --- a/src/modules/cap.c +++ b/src/modules/cap.c @@ -209,7 +209,7 @@ static void cap_end(Client *client, const char *arg) ClearCapabilityFast(client, CAP_IN_PROGRESS); - if (*client->name && client->user && *client->user->username && IsNotSpoof(client)) + if (is_handshake_finished(client)) register_user(client); }