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 #7704: [OSX] Handle malformed UTF8 strings #7705
Conversation
To make the commit checker happy, you'll need to fix your commit messages following https://wiki.openttd.org/Coding_style#Commit_message |
Done! |
You forgot the colon after the ticket number in the commit message. |
Note that the commit message itself must be amended, not just the PR title Sorry about this, we're very particular about our commit history :) |
Oh sure. I'll fix it now |
Done! |
This is a fix that prevents crash on OSX, but this doesn't fix the real origin of the problem, which is permitting servers to have badformed UTF8 strings... :-/ |
It would be impossible to prevent anyone from making a patched game that intentionally sends bad UTF8 to network clients, but the master server possibly should reject servers registering with invalid text. |
Yeah, a patched game can intentionally send bad UTF8, that's right. But I think that the server that currently have bad UTF8 that makes my OpenTTD client to crash didn't make it intentionally. The server with which I detected the error was an czech server that has no intention of creating any issue to clients. Btw, when is this patch going to be integrated in official compiled game? I can not play until servers stop of using bad UTF8 strings :( |
I think the best short-term solution is to patch the master server so it delists servers with invalid text in any field. |
I've made a quick check of master server's code, and I have not seen any message that implies server-name info at the time of registration. Am I ok? |
Well... I think that payload on packet I have to make it to compile and run, and then make some testings. Buuuuuut, there's no possibility of creating issues on masterserver repo :( |
This seems to be the code that receives the server data response: It doesn't do much validation of the data, which would need to be added. |
Yep, that's interesting. I think there's something that can be done... |
No description provided.