Skip to content
Snippets Groups Projects

Fix bans by remote admins corrupting banlist

Merged Hanicef requested to merge Hanicef/SRB2Classic:fix-ban-corruption into next

if a remote admin bans a player, the banlist ends up corrupted. this is caused by a use-after-init inside the server-side ban logic, where the ban message has not been extracted yet from the network packet that contains the ban. as a result, it starts writing bogus data to the ban reason, which can cause binary characters in ban.txt and thus prevent it from loading on next startup.

the fix simply involves moving the persistence logic later in the function to ensure the buffer that contains the reason has been written to, as well passing NULL when no reason was specified.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
Please register or sign in to reply
Loading