Commit Graph

294 Commits (1dcf0b782826b9f1d00dd866997a7a8e0cd46518)

Author SHA1 Message Date
justcool393 5e773f9e75 Revert "sneed" (this is supposed to be like this)
This reverts commit b5aefda124.
2022-11-19 06:45:54 -06:00
Aevann1 b5aefda124 sneed 2022-11-19 06:44:07 -06:00
justcool393 8f2f48d6d1
[DO NOT MERGE] import detanglation (#442)
* move Base definition to files.classes.__init__.py

* fix ImportError

* move userpage listing to users.py

* don't import the app from classes

* consts: set default values to avoid crashes
consts: warn if the secret key is the default config value

* card view: sneed (user db schema)

* cloudflare: use DEFAULT_CONFIG_VALUE

* const: set default values

* decouple media.py from __main__

* pass database to avoid imports

* import cleanup and import request not in const, but in the requests mega import

* move asset_submissions site check to __init__

* asset submissions feature flag

* flag

* g.is_tor

* don't import request where it's not needed

* i think this is fine

* mail: move to own routes and helper

* wrappers

* required wrappers move

* unfuck wrappers a bit

* move snappy quotes and marseys to stateful consts

* marsify

* :pepodrool:

* fix missing import

* import cache

* ...and settings.py

* and static.py

* static needs cache

* route

* lmao all of the jinja shit was in feeds.py amazing

* classes should only import what they need from flask

* import Response

* hdjbjdhbhjf

* ...

* dfdfdfdf

* make get a non-required import

* isort imports (mostly)

* but actually

* configs

* reload config on import

* fgfgfgfg

* config

* config

* initialize snappy and test

* cookie of doom debug

* edfjnkf

* xikscdfd

* debug config

* set session cookie domain, i think this fixes the can't login bug

* sdfbgnhvfdsghbnjfbdvvfghnn

* hrsfxgf

* dump the entire config on a request

* kyskyskyskyskyskyskyskyskys

* duifhdskfjdfd

* dfdfdfdfdfdfdfdfdfdfdfdf

* dfdfdfdf

* imoprt all of the consts beacuse fuck it

* 😭

* dfdfdfdfdfdfsdasdf

* print the entire session

* rffdfdfjkfksj

* fgbhffh

* not the secret keys

* minor bug fixes

* be helpful in the warning

* gfgfgfg

* move warning lower

* isort main imports (i hope this doesn't fuck something up)

* test

* session cookie domain redux

* dfdfdfd

* try only importing Flask

* formkeys fix

* y

* :pepodrool:

* route helper

* remove before flight

* dfdfdfdfdf

* isort classes

* isort helpers

* move check_for_alts to routehelpers and also sort imports and get rid of unused ones

* that previous commit but actkally

* readd the cache in a dozen places they were implicitly imported

* use g.is_tor instead of request.headers. bla bla bla

* upgrade streamers to their own route file

* get rid of unused imports in __main__

* fgfgf

* don't pull in the entire ORM where we don't need it

* features

* explicit imports for the get helper

* explicit imports for the get helper redux

* testing allroutes

* remove unused import

* decouple flask from classes

* syntax fix also remember these have side fx for some reason (why?)

* move side effects out of the class

* posts

* testing on devrama

* settings

* reloading

* settingssdsdsds

* streamer features

* site settings

* testing settings on devrama

* import

* fix modlog

* remove debug stuff

* revert commit 67275b21ab6e2f2520819e84d10bfc1c746a15b6

* archiveorg to _archiveorg

* skhudkfkjfd

* fix cron for PCM

* fix bugs that snekky wants me to

* Fix call to realbody passing db, standardize kwarg

* test

* import check_for_alts from the right place

* cloudflare

* testing on devrama

* fix cron i think

* shadow properly

* tasks

* Remove print which will surely be annoying in prod.

* v and create new session

* use files.classes

* make errors import little and fix rare 500 in /allow_nsfw

* Revert "use files.classes"

This reverts commit 98c10b876cf86ce058b7fb955cf1ec0bfb9996c6.

* pass v to media functions rather than using g

* fix

* dfdfdfdfd

* cleanup, py type checking is dumb so don't use it where it causes issues

* Fix some merge bugs, add DEFAULT_RATELIMIT to main.

* Fix imports on sqlalchemy expressions.

* `from random import random` is an error.

* Fix replies db param.

* errors: fix missing import

* fix rare 500: only send to GIFT_NOTIF_ID if it exists, and send them the right text

* Fix signup formkey.

* fix 2 500s

* propagate db to submissions

* fix replies

* dfdfdfdf

* Fix verifiedcolor.

* is_manual

* can't use getters outside of an app context

* don't attempt to do gumroad on sites where it's not enabled

* don't attempt to do gumraod on sites's where it's unnecessary

* Revert "don't attempt to do gumroad on sites where it's not enabled"

This reverts commit 6f8a6331878655492dfaf1907b27f8be513c14d3.

* fix 500

* validate media type

Co-authored-by: TLSM <duolsm@outlook.com>
2022-11-15 03:19:08 -06:00
justcool393 0cf37cfe5f fix for worker timeout 2022-11-11 04:19:44 -06:00
justcool393 f5912bb4cc we don't need bloody bs4 to get a bloody title 2022-11-11 04:19:43 -06:00
justcool393 ffd9c73566 reduce slur filter down to necessary ones and partially implement what fish wants (closes #432)
signed off by snekfriend
2022-11-09 00:05:56 -06:00
Aevann1 09d14aca47 revert linefeed change on fish's request 2022-11-07 22:49:54 +02:00
Aevann1 9b939b30a4 Revert "fixed 500"
This reverts commit ee4c534a92.
2022-11-07 08:09:04 +02:00
justcool393 ee4c534a92 fixed 500 2022-11-06 23:59:49 -06:00
Aevann1 a66add3897 make profanity filter actually usable 2022-11-07 07:35:20 +02:00
justcool393 502314ad3c colors: filter properly 2022-11-06 20:06:37 -08:00
Aevann1 d76fe63c7f constantify image extensions and fix imgur .gif bug 2022-11-05 23:01:23 +02:00
justcool393 3f457333b5 profanity: per fish request disable profanity filter everywhere but rdrama
feel free to revert this or whatever if discussed
2022-11-04 08:43:59 -05:00
justcool393 12fbe686d5 don't use regex in the slur filters for now
it doesn't work
2022-11-03 18:33:56 -05:00
justcool393 bf448a557e fix *another* 500 2022-11-03 18:22:47 -05:00
justcool393 bed478276d fix carp 500 2022-11-03 18:21:24 -05:00
justcool393 23c5a2ddb5 handle case where is None 2022-11-03 18:14:55 -05:00
justcool393 118a58c104 fix matches (PCRE uses weird 1 indexing) 2022-11-03 18:11:22 -05:00
justcool393 c6b1d90dd8 fix 500... again 2022-11-03 18:05:11 -05:00
justcool393 731c0cc83c fix 500 and add r*pe to the bad words filter 2022-11-03 18:03:30 -05:00
justcool393 5f8a27636e fix prev commit 2022-11-03 18:01:12 -05:00
justcool393 339d5fe8f1 users: add profanity filter to censor our gosh darned potty mouthes 2022-11-03 17:59:18 -05:00
Aevann1 972578e74a allow poetrysperg to skip the linefeeds thing 2022-11-01 02:04:37 +02:00
Aevann1 b9c482712a constantify file extensions 2022-10-30 16:55:43 +02:00
justcool393 578e1896fd sanitize: strip out html comments
they're unnecessary and never get rendered
2022-10-20 18:06:55 -05:00
Aevann1 9efc0f0a68 unify email regex 2022-10-19 12:39:03 +02:00
official-techsupport 4e23161f11
Re-enable showmore_regex for Snappy (#389)
* Re-enable showmore_regex for Snappy

* showmore a bit more aggressively
2022-10-06 02:17:28 -04:00
Aevann1 9134a91481 add jigsaw tier 2022-10-06 00:47:12 +02:00
justcool393 b0da0ac604 fix regex capturing groups 2022-10-04 17:58:51 -07:00
justcool393 d564592276 revert per aevann. (why are we replacing www.reddit.com) 2022-10-04 17:32:08 -07:00
justcool393 775686028b
use reddit regex from snapshillbot
reference: https://github.com/justcool393/SnapshillBot/blob/master/snapshill.py#L30
2022-10-04 16:05:14 -07:00
Aevann1 0039f3a217 Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost 2022-09-18 16:55:39 +02:00
Aevann1 b7c65c333b replace "np.reddit.com" (yikes) 2022-09-18 16:55:37 +02:00
justcool393 e00bf1f9a8
fix images in slur replacer (#359)
doesn't work with ALL CAPS TEXT, there's prolly a better way for this
2022-09-18 12:19:37 +02:00
justcool393 87c30bd1ee
fix utm regex (#357) 2022-09-17 23:13:14 +02:00
Aevann1 1a64ba3db8 hat submission UI 2022-09-10 07:37:11 +02:00
Aevann1 fbbb2c2ceb marsey submission stuff 2022-09-10 01:41:54 +02:00
Aevann1 5076859817 marsey UI stuff 2022-09-09 11:39:03 +02:00
Aevann1 0f232b264c refactor torture_ap 2022-09-05 22:05:04 +02:00
Aevann1 515526f9cb fix hat name regex 2022-09-03 03:57:03 +02:00
Aevann1 f221af76f2 allow capital letters in hat names 2022-09-03 03:51:24 +02:00
Aevann1 88a2c69659
Hats (#348)
* hat

* hats

* hats 2

* hats

* hats 4

* hats 5

* hats
2022-09-03 01:58:55 +02:00
Aevann1 52dd53f1d6 add :#trumpjaktalking: to the bottom of chudded comments and posts 2022-09-02 00:49:07 +02:00
official-techsupport d00d685c77
fix showmore regex (yet again) (#347) 2022-09-01 00:37:08 -04:00
official-techsupport 948972945a
fix showmore regex (again) (#346) 2022-08-31 17:08:27 +02:00
official-techsupport 643ea8b429
rewrite regex nonsense (#345) 2022-08-31 00:40:15 +02:00
official-techsupport 36c3cd60e8
showmore works in the presence of pre tags (#344) 2022-08-30 18:11:45 -04:00
official-techsupport a9eeb29b9b
fix showmore quadratic behavior (#343) 2022-08-30 23:19:53 +02:00
Aevann1 2dcd1288d7 Revert "adjust audio and video embedding"
This reverts commit e9d98e158c.
2022-08-26 20:15:26 +02:00
Aevann1 7084e71c57 fix pinging 2022-08-20 23:39:01 +02:00
Aevann1 e9d98e158c adjust audio and video embedding 2022-08-20 22:32:28 +02:00
Aevann1 d8c6b575de fix pinging 2022-08-19 15:10:39 +02:00
Aevann1 0715ab3e64 fix multipinging (hopefully this doesnt break other shit) 2022-08-17 21:41:09 +02:00
Aevann1 7edd569090 refactor nitter 2022-08-16 18:53:24 +02:00
Aevann1 0880694abd fix reddit replacing (fr this time) 2022-08-14 05:14:36 +02:00
Aevann1 2aa046c58a fix reddit replacing 2022-08-14 05:12:33 +02:00
Aevann1 b01aae3d43 fix muting 2022-08-13 11:48:55 +02:00
Aevann1 b59056fd16 fix muting 2022-08-13 11:24:56 +02:00
Aevann1 2d9b42237e fix https://rdrama.org/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/2497656?context=8#context 2022-08-13 10:26:33 +02:00
Aevann1 517d419f0b fix twitter.com/i/ links being switched to nitter 2022-08-13 10:00:35 +02:00
Aevann1 67f223536c increase hole max char limit from 20 to 25 2022-08-11 15:34:56 +02:00
Snakes 8b241a765a
Check URI approved embed in all CSS contexts. 2022-08-05 13:09:41 -04:00
Snakes 59344a28cd
Fix safe_url bypass for profilecss external embeds. 2022-08-05 12:32:56 -04:00
Aevann1 59faca9892 refine pronouns 2022-07-23 15:35:45 +02:00
Aevann1 ed36803842 allow uppercase on pronouns 2022-07-23 14:41:49 +02:00
Aevann1 aa644fd208 allow a third pronoun if total character count is 11 or lower 2022-07-23 08:48:32 +02:00
Snakes 001caf0c98
LGB: Add static /kb/ route; two static pages. 2022-07-18 04:39:21 -04:00
Aevann1 4058e2adce revert what I did with the slur regex 2022-07-17 21:17:46 +02:00
Aevann1 5703425418 improve slur regex 2022-07-17 07:24:53 +02:00
Aevann1 8bd7bd0ff8 fix nitter regex 2022-07-15 15:45:57 +02:00
Aevann1 c56f3951e1 make roll command neater 2022-07-14 16:43:05 +02:00
Aevann1 7243ed408f allow "I" as the first pronoun 2022-07-13 23:43:46 +02:00
Aevann1 df096e7cc4 add #roll 2022-07-13 15:06:59 +02:00
Aevann1 afa2f68804 change pronouns required format from 1-5 to 2-5 2022-07-12 20:28:07 +02:00
Aevann1 bab105223b make snappy archive youtube videos too 2022-07-11 19:45:07 +02:00
Snakes c385e12f9d Minor fix for pronouns logic. 2022-07-11 13:34:46 -04:00
Aevann1 6428dd08c5 add pronouns 2022-07-11 18:46:08 +02:00
Aevann1 c504b76329 fix this https://chapotraphouse.club/h/schizocel/post/84780/-/2289248?context=8#context 2022-07-11 16:09:13 +02:00
Aevann1 b5d9db86d1 refactor comment commands 2022-07-11 14:14:18 +02:00
Aevann1 b617321529 move all env-getting to .const 2022-07-08 18:21:13 +02:00
Aevann1 470b046702 compile regext outside of routes 2022-07-06 13:49:13 +02:00
Aevann1 c0c5057ab9 make reddit_domain_regex work with user profiles too 2022-07-04 03:12:28 +02:00
Aevann1 6c8bcc0bda fix long emojis 2022-07-03 10:00:42 +02:00
Aevann1 83228249ad fix marseyschizochadseethecapylovepat 2022-07-02 03:38:32 +02:00
Aevann1 461eba7427 fix issue with reddit domain replacement 2022-07-01 01:06:39 +02:00
Aevann1 95dc6bc4f3 fix old.reddit bug 2022-07-01 00:39:48 +02:00
Aevann1 b6a5d010ca add "show more..." button 2022-06-29 02:55:44 +02:00
Aevann1 4580cf534d fix strikethrough regex 2022-06-28 08:05:49 +02:00
Aevann1 50121f6960 fixed strikethrough 2022-06-28 07:41:21 +02:00
Aevann1 e527dec36b fix mentions in marquees 2022-06-27 07:14:45 +02:00
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
Aevann1 c5c21da76f validate colors 2022-06-24 19:32:31 +02:00
Aevann1 fcf600cb35 fix this https://chapotraphouse.club/post/79771/workaholics-are-worse-for-society-than/2183396?context=8#context 2022-06-24 16:45:19 +02:00
Aevann1 9593dc58dd move regex from helpers.const into its own helper file 2022-06-24 16:30:59 +02:00