Skip to content
This repository was archived by the owner on Nov 12, 2026. It is now read-only.

Commit d29b360

Browse files
ChrisLoveringjb3
authored andcommitted
Escape hyphen in regex string
Unescaped this was permitting any character between $ (index 36) and _ (index 95), which aren't all valid in urls.
1 parent ba3c64a commit d29b360

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎core/thread.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1953,7 +1953,7 @@ async def send(
19531953
attachments.append(attachment)
19541954

19551955
image_urls = re.findall(
1956-
r"http[s]?:\/\/(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*(),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+",
1956+
r"http[s]?:\/\/(?:[a-zA-Z]|[0-9]|[$\-_@.&+]|[!*(),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+",
19571957
message.content,
19581958
)
19591959

0 commit comments

Comments
 (0)