Skip to content

Purpur 1.26.1 - Hex color gradients bypass chat color restrictions #3798

Description

@CheekyNox

Are you using MySQL?

Yes

Are you using a proxy?

Yes - Velocity

"/version ChatControlRed" - plugin version

12.1.20

Optional: Error log

No response

ZIP of "/chc debug"

No response

Steps to reproduce

  1. Disable all permissions related to chat colors for a player.
  2. Make sure the player does not have any permission allowing MiniMessage colors.
  3. Send a chat message using MiniMessage gradient tags:
<gradient:#00BFFF:#8B008B>Test message</gradient>

The message is displayed with the gradient color.

However, other color formats are correctly blocked.

For example:

&#00BFFFTest message

does not work.

Also legacy/hex gradients written character-by-character do not work:

&#00BFFFT&#0DAEF4e&#199CEAs&#268BDFt &#3F68CAm&#4C57C0e&#5845B5s&#6534ABs&#7223A0a&#7E1196g&#8B008Be

Only MiniMessage gradient tags bypass the restriction:

<dark_gray>[</dark_gray><gradient:#ff5555:#ffaa00>EVENT</gradient><dark_gray>]</dark_gray>

Expected behavior

Players without color chat permissions should not be able to use any color formatting, including MiniMessage tags such as:

<gradient:#00BFFF:#8B008B>Text</gradient>

MiniMessage colors should follow the same permission checks as other color formats.


What happened instead?

Players can use MiniMessage gradient tags in chat even when they do not have any permissions for colored chat.

Other color formats are correctly blocked, but MiniMessage gradient formatting is still processed.


Additional information

Example of a message that incorrectly works:

<gradient:#00BFFF:#8B008B>Test message</gradient>

Result:
Gradient colored text appears in chat.

Screenshot attached showing the difference between blocked and allowed formats.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions