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
328 stars 174 forks source link

Bad SteamID Format in DB can broke comms page #906

Closed Rushaway closed 10 months ago

Rushaway commented 1 year ago

What are the steps to reproduce this issue?

  1. insert a comms with the ban SteamID format in sb_comms table (Stop_ignoring_retvals || steamid_pending)
  2. go on your comms pages
  3. congrats, page display is broken

What happens?

Comms page doesn't display until you remove bad steamid format from the DB manualy. Screenshoot

What were you expecting to happen?

Ignore the attempt to display comms performed with bad steamid format

Any logs, error output, etc.?

AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Exception: Invalid SteamID input! in /includes/SteamID/SteamID.php:108
Stack trace:
#0 /includes/SteamID/SteamID.php(84): SteamID\\SteamID::resolveInputID()
#1 /includes/SteamID/SteamID.php(56): SteamID\\SteamID::to()
#2 /pages/page.commslist.php(462): SteamID\\SteamID::toSteam3()
#3 /includes/page-builder.php(143): require_once('...')
#4 /index.php(29): build()
#5 {main}\n thrown in /includes/SteamID/SteamID.php on line 108', referer: https:/yourwebsite.com/index.php?p=banlist&advSearch=STEAM_0:0:158394035&advType=steamid&Submit

Any other comments?

What versions of software are you using?

Operating System: nginx SourceBans++ Version: 1.8.0 (php 8.1 branch) with the lastest release. PHP Version: 8.1.20 MySQL Version: 10.6.7-MariaDB-2ubuntu1 - Ubuntu 22.04 Link to your project: https://bans.nide.gg/index.php Link to a phpinfo() output: https://upgradebans.nide.gg/phpinfo.php

Trice1984 commented 11 months ago

sory, but the problems are today again:

» [Home]» [Ban List]

Warning: Trying to access array offset on value of type null in /var/www/vhosts/xloldies.de/sb.xloldies.de/includes/system-functions.php on line 171

Warning: Trying to access array offset on value of type null in /var/www/vhosts/xloldies.de/sb.xloldies.de/includes/system-functions.php on line 171

Fatal error: Uncaught Exception: Invalid SteamID input! in /var/www/vhosts/xloldies.de/sb.xloldies.de/includes/SteamID/SteamID.php:108 Stack trace: #0 /var/www/vhosts/xloldies.de/sb.xloldies.de/includes/SteamID/SteamID.php(84): SteamID\SteamID::resolveInputID() #1 /var/www/vhosts/xloldies.de/sb.xloldies.de/includes/SteamID/SteamID.php(56): SteamID\SteamID::to() #2 /var/www/vhosts/xloldies.de/sb.xloldies.de/pages/page.banlist.php(487): SteamID\SteamID::toSteam3() #3 /var/www/vhosts/xloldies.de/sb.xloldies.de/includes/page-builder.php(143): require_once('...') #4 /var/www/vhosts/xloldies.de/sb.xloldies.de/index.php(29): build() #5 {main} thrown in /var/www/vhosts/xloldies.de/sb.xloldies.de/includes/SteamID/SteamID.php on line 108

[SourceBans++] 1.8.0 | Git: 1294, where can i download : Git: 1320?

Many thanks