sbpp / sourcebans-pp

Admin, ban, and comms management system for the Source engine
https://sbpp.github.io/
Creative Commons Attribution Share Alike 4.0 International
327 stars 175 forks source link

bug: Client can be banned with SteamID pending #948

Closed Rushaway closed 1 month ago

Rushaway commented 4 months ago

What are the steps to reproduce this issue?

  1. Connect a target with a SteamID Pending status
  2. Ban him

What happens?

An admin banned a player with SteamID Pending, resulting in a empty ban inserted into DB.

What were you expecting to happen?

Don't ban the player, or get the steamid as backend verification of steam server.

Any logs, error output, etc.?

[sourcebans/sbpp_main.smx] "Kayn<1683><[U:1:66482081]><>" banned "May God bless you [Ronaldo]<1792><STEAM_ID_PENDING><>" (minutes: 4320) (reason: Bhop Hack).

Any other comments?

This is caused by OnClientAuthorized considering these as valid values https://github.com/alliedmodders/sourcemod/blob/master/plugins/include/clients.inc#L51-#L55

What versions of software are you using?

Operating System: ubuntu 20.04 SourceBans++ Version: PHP 8.1 branch, last commit SourceMod Version: 1.12 MetaMod Version: 1.12

Rushaway commented 1 month ago

Fixed in 02292fe https://github.com/sbpp/sourcebans-pp/blob/php81/game/addons/sourcemod/scripting/sbpp_main.sp#L358