aboutsummaryrefslogtreecommitdiff
path: root/modules/sslmodes.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2026-01-04 12:04:18 +0100
committerGravatar Sadie Powell2026-01-04 12:04:18 +0100
commitf33229ebde7e65b7cde07883e78b15e15952499d (patch)
tree71625ef7c8e72afe861f0966b352b4598a2859c5 /modules/sslmodes.cpp
parentAdd join time to the membership identifier. (diff)
parentRemove a v3-only notice, attempt two. (diff)
Merge branch 'insp4' into master.
Diffstat (limited to 'modules/sslmodes.cpp')
-rw-r--r--modules/sslmodes.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/sslmodes.cpp b/modules/sslmodes.cpp
index 68e7ffc62..d1d299d11 100644
--- a/modules/sslmodes.cpp
+++ b/modules/sslmodes.cpp
@@ -219,7 +219,9 @@ public:
/* If the target is +z */
if (target->IsModeSet(sslquery))
{
- if (!api || !api->IsSecure(user) || (calleridapi && !calleridapi->IsOnAcceptList(user, target)))
+ const bool is_secure = api && api->IsSecure(user);
+ const bool is_accepted = calleridapi && calleridapi->IsOnAcceptList(user, target);
+ if (!is_secure && !is_accepted)
{
/* The sending user is not on an TLS connection */
user->WriteNumeric(Numerics::CannotSendTo(target, "messages", &sslquery));