forked from rDrama/rDrama
1
0
Fork 0
rDrama/files/helpers
Snakes aaf718c78c Fix timeout in sanitize from link_fix_regex.
h/t to @official-techsupport for finding and help fixing this bug.
When given certain pathological input, `sanitize` would time out
(notably only on posts, rather than comments, perhaps due to the
longer maximum length of input). For example, using as input the
result of:

    with open("test.txt", "w") as f:
        for i in range(26):
            f.write(f":{chr(ord('a') + i)}: ")
        f.write('x' * 20_000)

We believe this to be because of some combination of the greedy
quantifiers and the negative lookahead before the match. The regex
was rewritten to (in theory) have much more linear performance.
2022-06-25 01:28:43 -04:00
..
actions.py Kitchen sink: emoji content, assert, assetcache. 2022-06-15 17:17:31 -04:00
alerts.py move regex from helpers.const into its own helper file 2022-06-24 16:30:59 +02:00
awards.py Refactor stat timers, award timers. 2022-06-10 05:47:41 -04:00
blackjack.py Add can_gamble user setting. 2022-05-30 05:32:45 -04:00
const.py stop using app.config for our own stuff 2022-06-24 17:08:57 +02:00
cron.py convert monthly marseybux into a cron task 2022-06-10 22:23:01 +02:00
discord.py sfd 2022-05-07 06:13:19 +02:00
get.py actually use the get functions 2022-06-24 15:19:53 +02:00
jinja2.py stop using app.config for our own stuff 2022-06-24 17:08:57 +02:00
lazy.py certified good commit 2022-05-25 19:01:29 +02:00
lottery.py Site-specific: change lotto for PCM. 2022-06-15 22:23:21 -04:00
media.py fix 413 error for patrons 2022-06-22 21:12:12 +02:00
offsitementions.py make reddit notifs look neater (again) 2022-06-23 01:45:09 +02:00
regex.py Fix timeout in sanitize from link_fix_regex. 2022-06-25 01:28:43 -04:00
sanitize.py Fix timeout in sanitize from link_fix_regex. 2022-06-25 01:28:43 -04:00
security.py mn 2022-05-05 01:09:46 +02:00
slots.py Add can_gamble user setting. 2022-05-30 05:32:45 -04:00
stats.py stats: add WAU based on activity timestamp. 2022-06-20 16:33:47 -04:00
treasure.py Treasure: raise minimum reward 10 -> 12. 2022-05-31 20:23:19 -04:00
wrappers.py actually use the get functions 2022-06-24 15:19:53 +02:00