Fix: #900 & #906
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.
nb: 3b1c56b I was thinking break can be a nice alt, but it's not a suitable solution
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';