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

AutoMod Bypass with Allowlist Wildcards (Blocking Links) #7356

Open
mxcabre opened this issue Jan 23, 2025 · 0 comments
Open

AutoMod Bypass with Allowlist Wildcards (Blocking Links) #7356

mxcabre opened this issue Jan 23, 2025 · 0 comments
Labels

Comments

@mxcabre
Copy link

mxcabre commented Jan 23, 2025

Description

AutoMod rules can be bypassed when an allowlist contains wildcards, and users write forbidden words or links without spaces. This allows users to circumvent filtering (e.g., links) while still permitting links from specific domains such as discord.com.

Proposed Solutions

  1. Default Behavior Adjustment:

    • Ensure that the allowlist wildcards only consume the characters explicitly matched by the regex.
  2. Enhanced Wildcard Options:

    • Add a + character alongside the existing * wildcard in the allowlist.
    • This new + wildcard would instruct the AutoMod rules engine to consume only the characters matched by the regex itself (if matched by a regex).
  3. Discord-Provided Link Rule:

    • Introduce a pre-built "Discord-provided" AutoMod rule specifically for filtering links.
    • Allow moderators to specify allowed domains and paths directly in the rule.
    • This would enable better optimization of link filtering while offering an improved user experience for end users and server moderators.

Steps to Reproduce

  1. Create an AutoMod rule with the following regex:
https?:\/\/[^\s<]+[^<.,:;"')\]\s]
  1. Add https://discord.com/* to the allowlist.
  2. Send the following message in chat:
https://discord.com<>https://evil-domain.com

Expected Behavior

  • The wildcard in the allowlist should not consume characters in a way that prevents the rule from matching multiple occurrences.
  • AutoMod should still block the forbidden links while correctly allowing links from discord.com.

Current Behavior

  • Wildcards in the allowlist consume characters improperly, causing the regex to fail at matching multiple occurrences of links.
  • This allows bypassing of AutoMod rules when combining valid and invalid links.

Screenshots/Videos

No response

Client and System Information

N/A

@mxcabre mxcabre added the bug label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant