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

Culture problem with webhook token regex validation #1636

Closed
serkanyazicioglu opened this issue Sep 26, 2020 · 2 comments
Closed

Culture problem with webhook token regex validation #1636

serkanyazicioglu opened this issue Sep 26, 2020 · 2 comments

Comments

@serkanyazicioglu
Copy link
Contributor

Hello,

Webhook url validation regex fails when used with various different cultures. You can basically add 'RegexOptions.CultureInvariant' to WebhookUrlRegex object to mitigate the issue.

private static Regex WebhookUrlRegex = new Regex(@"^.*(discord|discordapp)\.com\/api\/webhooks\/([\d]+)\/([a-z0-9_-]+)$", RegexOptions.CultureInvariant | RegexOptions.Compiled | RegexOptions.IgnoreCase);

Thanks...

@Starbors
Copy link

lol

@SubZero0
Copy link
Member

SubZero0 commented Nov 7, 2020

Closing since #1637 was merged.

@SubZero0 SubZero0 closed this as completed Nov 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants