From 5cd7134cc28f8a8c12c3cf5d45772d3fce3cda2e Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Fri, 18 Oct 2019 14:00:46 +0200 Subject: [PATCH] Reject invalid SID from PROTOCTL. --- src/modules/protoctl.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/protoctl.c b/src/modules/protoctl.c index 060c5d9e2..6ca0acef1 100644 --- a/src/modules/protoctl.c +++ b/src/modules/protoctl.c @@ -184,6 +184,12 @@ CMD_FUNC(cmd_protoctl) return; } + if (!valid_sid(value)) + { + exit_client(client, NULL, "Invalid SID. The first character must be a digit and the other two characters must be A-Z0-9. Eg: 0AA."); + return; + } + if (IsServer(client)) { exit_client(client, NULL, "Got PROTOCTL SID after SERVER, that's the wrong order!");