kangarko / ChatControl-Red

Issue tracker and documentation for the next generation ChatControl Red, the most advanced chat management plugin.
44 stars 22 forks source link

1.18.2 /me not respecting color permissions, players able to bypass and use whatever formatting they want #2463

Closed TomLewis closed 9 months ago

TomLewis commented 9 months ago

"/version ChatControlRed" - plugin version

10.20.2

Are you using MySQL?

Yes

Are you using BungeeCord?

Yes

Error log (if applicable)

No response

"/chc debug" output (strongly recommended)

No response

Information about the issue/bug

Im not on the latest version of chatcontrol so maybe this has already been fixed, but I just accidentally found out but any player can use /me &bColor codes to bypass and spam chat with any colors Even when they dont have permission for any colors in chat

kangarko commented 9 months ago

Can't reproduce:

a

Assuming OP gives all perms and non-OP takes all. Must be a permission issue somewhere on your end, sorry. My nonOP has these:

default:
  permissions:
  - cowcannon.command.cow
  - cowcannon.cow.use
  - chatcontrol.command
  - chatcontrol.command.tell
  - chatcontrol.command.me

Check if players that should not, have some of these perms:

b

TomLewis commented 9 months ago

Oh its not permissions this is the first thing I searched for. The permissions for color should be global to the plugin right? They are blocked elsewhere in the plugin, just not /me did you test with this specific version of Chat Control? Im using 10.20.2 atm.

Its definitely running via ChatControl as its the formatting I set in ChatControl.

So unless somehow its displaying the /me via ChatControl but either CMI or Essentials is taking over permission of the colors for it?

kangarko commented 9 months ago

Can you please test with 10.21.10?

Correct observation, can you double check if you don't have EssentialsX/CMI permissions there, just in case? Not sure how that would interfere except if they listened to the command event which lets them modify the message, although it's unlikely.

TomLewis commented 2 months ago

I'm now using the latest chat control red and this is still an issue.

kangarko commented 2 months ago

Try embedding the format in settings.yml:

a

I still reproduce with/without OP:

b

Give explicit negative -chatcontrol.use.color.me to those players who cant use it in /me and it will block all. Debug with your perm plugin if the issue persists please.

kangarko commented 2 months ago

Here is my permission setup to prevent /me color use:

a

TomLewis commented 2 months ago
- chatcontrol.use.color.me:
    world: PirateCraft_1
    value: false

Does nothing, so its not being inherited, if you want I can do a luckperms verbose to double check?

I already have a format set for /me that forces color

# -------------------------------------------------------------------------------------------------
# A /me is a command allowing you to broadcast your message in a different way then chat.
# -------------------------------------------------------------------------------------------------
Me:

  # Should we enable this feature?
  Enabled: true

  # What commands will invoke the me feature?
  # EDIT AS YOU WISH BUT THERE MUST BE AT LEAST ONE ALIAS
  Command_Aliases:
  - 'me'

  # The format used in the command. You can type the format here or reference to one in formats/.
  Format: me

me.yml

# -----------------------------------------------------------------------------------------
# Represents a chat format file that can be used to stylize messages.
# See the chat.yml for a tutorial on how this works.
# -----------------------------------------------------------------------------------------

# The parts of this format.
Parts:
  Normal:
    Message: '&d►&r '
  Player:
    Message: '{pl_prefix}{nick}'
    Suggest_Command: '/me {player} '
  Suffix:
    Message: '{pl_suffix} '
  The_Rest:
    Message: '&5&o{message}'
    Hover:
    - '&6Describes an action in the context of the pirate.'
kangarko commented 2 months ago

Can you do luckperms verbose please? Try without the world parameter but it should not matter. Config looks ok.

TomLewis commented 1 month ago

Weirdly, it checks the chatcontrol.command.me 8 times for one use. Most are "undefined" including all colors, I dont really want to send this verbose public, but im happy to share it in a DM somewhere. Here you can see the chatcontrol.use.color.me is false, but chatcontrol.command.me is true, then all colors are undefined. Should I try setting chatcontrol.color.* to false too? see if that changes much?

image

If I filter for just chatcontrol. and exclude all undefined, this is the permissions true and false

image

kangarko commented 1 month ago

Sorry for a late reply. Yes please set the color permissions to false explicitely.

TomLewis commented 1 week ago

I set

- chatcontrol.color.*:
    value: false

But they can still use colors in /me, unless you want them to all be individually set such as chatcontrol.color.red

Edit, Nope lol Tried chatcontrol.color.red denied specifically and still can use &c in /me.

kangarko commented 1 week ago

Then it has to come from some other plugin. I literally tested this like twice with your exact permissions setup. Looks like some weird incompatibility or they have the perms somehow.

TomLewis commented 1 week ago

Nuts.

Time to play with LP verbose again then and serach for colors.

If I find a plugin conflict ill tell you and we can figure out the best course of action from there. My bet is on CMI, even tho I have its chat features disabled.