From 87facef69acfaa1d8b69b5a03bfabc9582aa1ace Mon Sep 17 00:00:00 2001 From: Andi Qu <31325319+dolphingarlic@users.noreply.github.com> Date: Sun, 24 Jan 2021 19:57:26 +0200 Subject: More restrictive GitHub gist regex for usernames --- bot/exts/info/code_snippets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/exts/info/code_snippets.py b/bot/exts/info/code_snippets.py index 75d8ac290..e1b2079d0 100644 --- a/bot/exts/info/code_snippets.py +++ b/bot/exts/info/code_snippets.py @@ -18,7 +18,7 @@ GITHUB_RE = re.compile( ) GITHUB_GIST_RE = re.compile( - r'https://gist\.github\.com/([^/]+)/(?P[a-zA-Z0-9]+)/*' + r'https://gist\.github\.com/([a-zA-Z0-9-]+)/(?P[a-zA-Z0-9]+)/*' r'(?P[a-zA-Z0-9-]*)/*#file-(?P[^#>]+?)' r'(-L(?P\d+)([-~:]L(?P\d+))?)' ) -- cgit v1.2.3