Skip to content
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

Configuration for ticket channel names #3143

Closed
1 of 2 tasks
nitrofski opened this issue Mar 24, 2022 · 3 comments
Closed
1 of 2 tasks

Configuration for ticket channel names #3143

nitrofski opened this issue Mar 24, 2022 · 3 comments
Labels
feature request staged Staged for next version

Comments

@nitrofski
Copy link

Is your feature request related to a problem? Please elaborate.

Private channels in discord cannot be accessed, but can still be discovered by can be discovered using third-party clients. This allows anyone to view the names of the currently open tickets. Since the current ticket name is the mangled ID of the Discord user that opened the ticket, anyone can theoretically see who has opened a ticket. One of the main reason we use Modmail is to keep all information relating to ongoing issues private, having the user ID in the channel name is problematic.

Describe the solution you'd like

A configuration to change the channel naming strategy.

Optionally, changing the default channel naming to the more anonymous version so other servers are not surprised by the channel discoverability issue.

Does your solution involve any of the following?

  • Logviewer
  • New config option

Describe alternatives you've considered

Opening threads in a single channel instead of completely new channels — threads are short lived, so unless Modmail continuously refreshes it this would not be viable

Who will this benefit?

Everyone concerned about secrecy.

Additional Information

No response

@fourjr
Copy link
Collaborator

fourjr commented Apr 24, 2022

As mentioned in #2982, plugins can now extend Bot.format_channel_name(bot, author, exclude_channel=None, force_null=False).

In addition, a variety of config options have already been added regarding channel names such as use_timestamp_channel_name.

As such, custom channel names are now further out of the scope of Modmail and plugins should be the ones extending this functionality.

@fourjr fourjr closed this as completed Apr 24, 2022
@fourjr fourjr added the out of scope Create a plugin for this feature instead label Apr 24, 2022
@ghost
Copy link

ghost commented Apr 25, 2022

Would it be a good idea to have a configuration which allowed randomized names/numbers? While this would make it difficult for moderators to keep track of whose ticket is which it would help people who are concerned about privacy/secrecy

@fourjr fourjr reopened this May 3, 2022
@fourjr fourjr removed the out of scope Create a plugin for this feature instead label May 3, 2022
fourjr added a commit that referenced this issue May 3, 2022
@fourjr
Copy link
Collaborator

fourjr commented May 3, 2022

17b2f89 adds a use_random_channel_name in v4-dev12.

The algorithm for this random channel name is as follows:

  • Using a portion of the token and the user ID, an MD5 hash is created.
  • The last 8 characters of this MD5 hash is used for the channel name.

This accomplishes the following objectives:

  • A random channel name that is not immediately tied to anything.
  • A form of familiarity for same users (identical hash for identical bot+user combination) to quickly notice spammers
  • Non-reversible: Hashes are by nature, irreversible and anyone knowing simply the channel name is not able to obtain the bot token or the user ID. Furthermore, only a portion of the hash is displayed, making it literally impossible to reverse.
  • Due to the hash incorporating the bot token, malicious actors without the token cannot bruteforce all possibilities to find out the recipient of a channel.

@fourjr fourjr added the staged Staged for next version label Jul 3, 2022
@fourjr fourjr closed this as completed Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request staged Staged for next version
Projects
None yet
Development

No branches or pull requests

2 participants