[Vulnerabilities/hazards] All has 'Announce' function can crash on the client

Started by 2b2ttianxiu, Jul 16, 2023, 05:04 PM

Previous topic - Next topic

2b2ttianxiu

The function Vulnerabilities and hazards.
This vulnerability does not jeopardize the server, but it can crash the client, and may also cause a blue screen of death
I pinpointed the cause of this crash to the parser function
Since I noticed the parsing of the "~" makes it crash the client, the only way to ensure that it doesn't jeopardize the player's gaming experience could be to first replace the text of the server-side ann command (announcement command) with "~" for air, or remove it
There are two ways for developers to fix this:
1. Add code that detects if the client is crashing, such as a try catch or an if judgment.
2. incomplete color characters let it show up and prevent parsing (I think this is the best solution)