sourcebans-pp icon indicating copy to clipboard operation
sourcebans-pp copied to clipboard

Fix: #900 & #906

Open Rushaway opened this issue 2 years ago • 2 comments

Description

Check if the Steamid format is valid by using isValidID() from SteamID.php

For #900 I check if isset & is not empty (bcs they can be empty with sm_banip) For #906 No need to check if set bcs all comms are based on steamid system (no ip supported)

Motivation and Context

Prevent bad format to break page view. Give this $data['steamid'] = 'STEAM_0:0:00000000'; when the isValid return false.

How Has This Been Tested?

For #900 I have a ban in db with STEAM_ID_STOP_IGNORING_RETVALS as SteamID in authid colume (also tested with a player name..) For #906 I have a comms in db with STEAM_ID_STOP_IGNORING_RETVALS as SteamID in authid colume

Screenshots (if appropriate):

Types of changes

  • [X] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [X] My code follows the code style of this project.
  • [ ] My change requires a change to the documentation.
  • [X] I have updated the documentation accordingly.
  • [X] I have read the CONTRIBUTING document.

Rushaway avatar Jul 09 '23 09:07 Rushaway

nb: 3b1c56b I was thinking break can be a nice alt, but it's not a suitable solution

Rushaway avatar Jul 09 '23 09:07 Rushaway

I had this issue as well. I accidentally banned one of the bots in Left 4 Dead 2 in-game and 'BOT' was added to the ban as their SteamID. This was fine pre-1.7 but causes the page to refuse to load now. Fixed by running the following MySQL commands ('sourcebans' being my database): USE sourcebans DELETE FROM sb_bans WHERE authid = 'BOT';

conorab avatar Jul 23 '23 02:07 conorab