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

[BUG]: Having a user called "silent"/"silently" in the server confuses silent contact #3179

Closed
Erisa opened this issue Aug 25, 2022 · 1 comment
Labels
bug This is a confirmed bug staged Staged for next version

Comments

@Erisa
Copy link

Erisa commented Aug 25, 2022

Bot Version

3.10.3

How are you hosting Modmail?

Heroku

Error Logs

https://haste.erisa.uk/agiquq.apache

Screenshots

image
image

Additional Information

If a user in the server is called silent or silently then the flow ?contact @user silent or ?contact @user silently respectively will become confused and a open a non-silent thread with both @user and the user called silent or silently.

If unnoticed this results in the contact not being silent (Shows the recipient who opened the thread) and the silent/silently user receiving all of the modmail communication in that thread.

Reproduction is somewhat simple, just have a user named silent or silently in the server and use ?contact @user silent against a different user.

From my understanding this appears to happen because the users argument will do a "greedy" match against any users it can find before getting to the silent/silently argument after it, causing the silent/silently to be dropped and the matching user to be added to the list in its place.

https://github.com/kyb3r/modmail/blob/be14cca89742cd691f6b91f0d0931a074ad81e3b/cogs/modmail.py#L1333-L1340

@Erisa Erisa added the maybe: bug An unconfirmed bug label Aug 25, 2022
@ghost
Copy link

ghost commented Sep 6, 2022

Can reproduce on v4 also

@fourjr fourjr added bug This is a confirmed bug staged Staged for next version and removed maybe: bug An unconfirmed bug labels Sep 6, 2022
@fourjr fourjr closed this as completed Sep 6, 2022
fourjr added a commit that referenced this issue Sep 6, 2022
Erisa pushed a commit to Microsoft-community/modmail that referenced this issue Sep 10, 2022
Erisa added a commit to Microsoft-community/modmail that referenced this issue Sep 11, 2022
Erisa added a commit to Microsoft-community/modmail that referenced this issue Oct 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This is a confirmed bug staged Staged for next version
Projects
None yet
Development

No branches or pull requests

2 participants