From b3a3b090b466ed8bcf7265082c394577e1636edd Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sun, 15 Nov 2026 14:47:08 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=92=20Handle=20missing=20accounts=20in?= =?UTF-8?q?=20user=20modification=20responses?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rejecting an empty username built the response packet from a nil account reference. --- Server/UAdminHandling.pas | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Server/UAdminHandling.pas b/Server/UAdminHandling.pas index 32fad6f..ab96caf 100644 --- a/Server/UAdminHandling.pas +++ b/Server/UAdminHandling.pas @@ -343,8 +343,11 @@ begin inherited Create($03, 0); FStream.WriteByte($05); FStream.WriteByte(Byte(AStatus)); - FStream.WriteStringNull(AAccount.Name); - if (AStatus = muAdded) or (AStatus = muModified) then + if AAccount <> nil then + FStream.WriteStringNull(AAccount.Name) + else + FStream.WriteStringNull(''); + if ((AStatus = muAdded) or (AStatus = muModified)) and (AAccount <> nil) then begin FStream.WriteByte(Byte(AAccount.AccessLevel)); FStream.WriteByte(AAccount.Regions.Count);