Discord usernames are not sanitized properly
x86-assembly opened this issue · 1 comments
Expected behavior
When a user in discord sets their display name to something like
§%allroles%%allroles%|%username%
, the string §%allroles%%allroles%|%username%
should be displayed like that in MineCraft.
Actual behavior
What it actually does:
- it first replaces the placeholders to something like:
§Datenalchemist | Siedler | ServerboosterDatenalchemist | Siedler | Serverbooster|asm_x64
- the section sign in the beginning then causes the Minimessage formatting to break, causing the message to start like this:
[<aqua>Discord</aqua> | Datenalchemist<reset>]
instead of actualy colorcoding it. - MineCraft then turns the section sign and the first character of the %allroles% placeholders value into a color, in this case purple (§D from
§Datenalchemist ...
).
In the end, a displayname like§%allroles%%allroles%|%username%
will be displayed like this
Steps to reproduce
- Set your Discord display-name to
§%allroles%%allroles%|%username%
- Send a chat message in any Discord channel that is linked with a MineCraft server through DiscordSRV
- Go to MineCraft, and Look at the Result
Server software and version
No response
Checks
- I am not using an outdated version of DiscordSRV.
- I asked in DiscordSRV's Discord server to see whether this issue is in fact a bug that needs to be fixed.
Ticket number or message link to where you asked in DiscordSRV's Discord server about this
"19682-hw-minimessage-and-stuff"
Anything else
No response
simmilar to #1141