Skip to content

Commit

Permalink
Merge pull request #908 from Rushaway/fix-906
Browse files Browse the repository at this point in the history
Fix: #900 & #906
  • Loading branch information
Hackmastr authored May 29, 2024
2 parents 249d5f2 + 2e65374 commit 50fa95f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions web/pages/page.banlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,10 @@ function setPostKey()
$data['player'] = addslashes($res->fields['player_name']);
$data['type'] = $res->fields['type'];
$data['steamid'] = $res->fields['authid'];
// Fix #900 - Bad SteamID Format broke the page view, so give them an null SteamID.
if (isset($data['steamid']) && !empty($data['steamid']) && !\SteamID\SteamID::isValidID($data['steamid'])) {
$data['steamid'] = 'STEAM_0:0:00000000';
}
$data['communityid'] = $res->fields['community_id'];
$data['steamid3'] = \SteamID\SteamID::toSteam3($data['steamid']);

Expand Down
4 changes: 4 additions & 0 deletions web/pages/page.commslist.php
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,10 @@ function setPostKey()
$data['ban_date'] = Config::time($res->fields['ban_created']);
$data['player'] = addslashes($res->fields['player_name']);
$data['steamid'] = $res->fields['authid'];
// Fix #906 - Bad SteamID Format broke the page view, so give them an null SteamID.
if (!\SteamID\SteamID::isValidID($data['steamid'])) {
$data['steamid'] = 'STEAM_0:0:00000000';
}
$data['communityid'] = $res->fields['community_id'];
$steam2id = $data['steamid'];
$steam3parts = explode(':', $steam2id);
Expand Down

0 comments on commit 50fa95f

Please sign in to comment.