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

1.8.0 Server webpage breaks if players have certain special characters. #971

Open
Xbye opened this issue Jun 21, 2024 · 8 comments
Open

Comments

@Xbye
Copy link

Xbye commented Jun 21, 2024

What are the steps to reproduce this issue?

  1. Change your name to: 𝖊𝖓𝖆𝖓𝖙𝖆𝖙𝖔
  2. Join a L4D2 server that is listed on your webpanel.
  3. Go to your server page where your server is listed.

What happens?

The SourceBans++ Webpanel is not able to retrieve information from the server. It is stuck "Querying Server Data" forever.

A popup comes up saying:
AJAX Call Failed!
Error: the XML response that was returned from the server is invalid. Received: Community Server #62/4]]>]]>bdp_bunker04Community Server #6

What were you expecting to happen?

Not an error, pop-up, and the server to query data. Server is fine. It is responsive to query requests from things not Sourcebans++. Players are playing just fine.

Any logs, error output, etc.?

Any other comments?

Please walk me through how to provide any logs if necessary. Steps to reproduce this issue is very easy.

What versions of software are you using?

Operating System: Ubuntu 24.04 LTS
SourceBans++ Version: 1.8.0
PHP Version: 8.3
MySQL Version: mysql Ver 15.1 Distrib 10.11.8-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper
Link to your project: N/A?
Link to a phpinfo() output: N/A?

@Rushaway
Copy link
Contributor

I can't repro it on CS: S because these kind of chars is not correctly supported and just turn into a square box and I don't have L4D2 env to test.

I believe this kind of issue can also happen in any plugin who uses SQL/Ajax.
I suggest you to use a global fix to directly rename invalid name.
This is what I use personally https://github.com/srcdslab/sm-plugin-NameFilter/

Otherwise, in a perfect fix on sbpp side, we will need support specials chars with ajax.

@Xbye
Copy link
Author

Xbye commented Jun 21, 2024

I can't repro it on CS: S because these kind of chars is not correctly supported and just turn into a square box and I don't have L4D2 env to test.

I believe this kind of issue can also happen in any plugin who uses SQL/Ajax. I suggest you to use a global fix to directly rename invalid name. This is what I use personally https://github.com/srcdslab/sm-plugin-NameFilter/

Otherwise, in a perfect fix on sbpp side, we will need support specials chars with ajax.

Hello.

Left4Dead 2 does not support this charset either, and their names turn to squares in L4D2 as well. The only issue seems to be the server Webpanel. I went ahead and banned myself (using this name). The MySQL database took it just fine, and the ban Webpanel handled it as well.

As for the plugin. I would like to use that plugin as a last resort if this can't be fixed. Because a huge amount of the Left4Dead 2 playerbase uses special characters, but this is the first time I've had the server webpanel break from them. I would prefer not to disrupt my player's games by renaming probably dozens of people per day, since I have over a dozen servers open to the public that are constantly full.

(IP is from a VPN)
image

By default, the DB (I generated through install) has a DEFAULT_COLLATION_NAME of utf8mb4_general_ci. I had another person who runs a L4D2 server to ban themselves with this name, and their database represented it better since they seem to be using utf8mb4_unicode_ci. I'll try changing my DB to that so that the bans render, but I don't think MySQL is responsible for the server webpage.

EDIT: Seems it's the SB++ plugin that is feeding a garbaged name into the database. Banning from the Webpanel seems to do everything just fine:

image

@Rushaway
Copy link
Contributor

@Hackmastr Maybe we should switch to utf8mb4_unicode_ci.
The differences in terms of performance are very slight compared to utf8mb4_general_ci

@Xbye
Copy link
Author

Xbye commented Jun 23, 2024

I found another name by a user that breaks the Sourcebans webpanel. Unlike 𝖊𝖓𝖆𝖓𝖙𝖆𝖙𝖔 which breaks the entire server query, the name /Mr.Kryakin\-❤xlebo_ytkaAHAHA seems to break interaction with the user on the Sourcebans webpanel.

image

You can see in this screenshot, it seems the \ is getting removed, and possibly not being properly escaped? Every other user on the server I could interact with.

@Rushaway
Copy link
Contributor

Do you have your dep correctly updates (file + sv side)? This commit was important. 2b017e8

@Xbye
Copy link
Author

Xbye commented Jun 24, 2024

Do you have your dep correctly updates (file + sv side)? This commit was important. 2b017e8

Hello. I downloaded everything from the "release" section of the repo. Using "Latest" for the plugin, and the "webpanel only" under the 1.7 release.

I went ahead and looked up what was inside my sourcebans/composer.json and compared it to that commit.

    "smarty/smarty": "~v4.3.0",

I guess I might be some versions behind since the commit shows:

    "smarty/smarty": "~v5.3.0",

I am unfortunately unsure how to update the Sourcebans webpanel. The "updater" folder in the github is from 10 months ago, with the updater.php being 2 years ago. I guess I would need to learn how to pull the entire repo and isolate the web section?

@Xbye
Copy link
Author

Xbye commented Jun 24, 2024

I did a full reinstall of SB++ using the latest branch version. With composer madness and everything. Website currently says:

SourceBans++ 1.8.0 | Git: 1411

So the webpanel is running on the latest version. Plugins should also be the latest version as well.

Both of these names:
𝖊𝖓𝖆𝖓𝖙𝖆𝖙𝖔
/Mr.Kryakin\-❤xlebo_ytkaAHAHA
are still causing the same issues as before I updated.

@Xbye
Copy link
Author

Xbye commented Jul 3, 2024

Found another name that breaks Sourcemod webpanel interaction:

image

In I'm a goose, if you try to view profile it says the player isn't on the server. This is wrong. I believe Sourcebans is not escaping the '. Similarly to the name in the previous post where it is not escaping the \.

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

No branches or pull requests

2 participants