Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: #900 & #906 #908

Merged
merged 2 commits into from
May 29, 2024
Merged

Fix: #900 & #906 #908

merged 2 commits into from
May 29, 2024

Conversation

Rushaway
Copy link
Contributor

@Rushaway Rushaway commented Jul 9, 2023

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

  • 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:

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

@Rushaway
Copy link
Contributor Author

Rushaway commented Jul 9, 2023

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

@conorab
Copy link

conorab commented Jul 23, 2023

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';

@Hackmastr Hackmastr merged commit 50fa95f into sbpp:php81 May 29, 2024
1 check passed
@Rushaway Rushaway deleted the fix-906 branch May 30, 2024 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants