🔒 Handle missing accounts in user modification responses

Rejecting an empty username built the response packet from a nil
account reference.
This commit is contained in:
2026-11-15 22:08:32 +01:00
parent 464c170e2d
commit b3a3b090b4
+5 -2
View File
@@ -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);