🔒 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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user