-
Notifications
You must be signed in to change notification settings - Fork 175
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
Update ban page SteamID check #579
Conversation
There are users with a much shorter Steam ID, and when attempting to ban those individuals, the check fails.
Why not just do it through XMLHttpRequest (JS Ajax) (or any ajax else)?
Or (for custom url).
|
Because for this checks, Steam API key is required. |
No-no-no. |
I wouldn't use steam API calls for ID validation, simply because you would risk running into rate limiting and with akamai's agressive rate limiting and IP blacklisting that would be counter productive (also one of the reasons we use the steam API so sparsely in SBPP) |
Anyway, I just suggested using more accurate methods. And maybe display more info about player in ban page. |
You could convert and copy the regex from https://github.com/sbpp/sourcebans-pp/blob/v1.x/web/includes/SteamID/SteamID.php#L64 for consistency. |
6029d3b
to
7c4446f
Compare
Returns `true` if pattern is found in string, `false` otherwise Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test
Instead of checking if $('ip') or $('steam') are empty, just use the Ban Type selection from the form for this.
There are users with a much shorter Steam ID, and when attempting to ban those individuals, the check fails.
Description
Patches length
Motivation and Context
Fixes an issue with banning users with much shorter Steam ID
https://steamcommunity.com/profiles/76561197960265729 Should be the lowest with 11 characters.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: