Commit Graph

182 Commits (498f77bcffe9252d27c32af9d9c283ee6345ce46)

Author SHA1 Message Date
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 bf98444ead push notifications: fix pusher causing errors on large unicode msgs 2022-11-13 05:12:05 -06:00
Aevann1 cdffb764bd remove @jannies 2022-10-31 00:41:26 +02:00
justcool393 a2c16534a4 admin pings: truescore requirement and exclude shadowban and make a permission 2022-10-22 19:45:15 -05:00
Aevann1 c4103cfaf4 add @jannies to notify all jannies 2022-10-23 01:50:56 +02:00
justcool393 6e33531be3 remove a _FOR_ 2022-10-06 00:38:33 -07:00
justcool393 dc5a132583 mop visibility, WPD notifications, and a fix with shadowbans 2022-10-05 22:25:45 -07:00
Snakes 4a54c6219a
Add trailing final newlines to source files.
Touched a ton of files to finally standardize on having trailing
final newlines, as best practice recommends and so our devs stop
accidentally fighting each other over it.

This was performed automatically with the following:
git ls-files -z '*.py' | while IFS= read -rd '' f; \
    do tail -c1 < "$f" | read -r _ || echo >> "$f"; done
git ls-files -z '*.css' | while IFS= read -rd '' f; \
    do tail -c1 < "$f" | read -r _ || echo >> "$f"; done
2022-09-29 01:43:29 -04:00
Aevann1 027449325f tweak to send_repeatable_notification() to minimize num of comments 2022-09-02 03:59:05 +02:00
Aevann1 6a21dd347b Revert "Revert "Revert "restore autoflush"""
This reverts commit d84b26fc77.
2022-08-25 17:04:33 +02:00
Aevann1 11d7f34ad0 allow hole jannies to change the hole marsey + cachebust all site assets 2022-08-25 00:22:44 +02:00
Aevann1 d84b26fc77 Revert "Revert "restore autoflush""
This reverts commit 5aa03d87bb.
2022-08-24 16:36:44 +02:00
Aevann1 5aa03d87bb Revert "restore autoflush"
This reverts commit 687cd766b9.
2022-08-23 17:17:37 +02:00
Aevann1 663904fb3d steal the parts I wanted from spidey's PR 2022-08-21 19:20:09 +02:00
Aevann1 7084e71c57 fix pinging 2022-08-20 23:39:01 +02:00
Aevann1 d8c6b575de fix pinging 2022-08-19 15:10:39 +02:00
Aevann1 905e8ae351 WPD daisy filter 2022-08-18 11:52:37 +02:00
Aevann1 687cd766b9 restore autoflush 2022-08-17 18:36:59 +02:00
Aevann1 8e8264de92 kill LGB 2022-08-15 17:24:40 +02:00
Aevann1 1be6a6f0dd sneed 2022-08-14 01:49:18 +02:00
Aevann1 9267d43293 fix censoring notifs 2022-08-11 13:45:30 +02:00
Aevann1 861b16478b fix b6e7151cce 2022-08-11 13:40:36 +02:00
Aevann1 b6e7151cce censor notifs 2022-08-11 13:27:52 +02:00
Aevann1 0429da4493 mod action notifs rework 2022-08-05 23:50:30 +02:00
Snakes 0539609d61
Restrict abuse from young accounts. 2022-07-29 15:55:12 -04:00
Aevann1 4c2cb82f48 change deux' assets 2022-07-10 22:27:56 +02:00
Aevann1 fe959573ec fix 500 errors 2022-07-10 16:29:47 +02:00
Aevann1 a8fe49f232 kitchen sink commit, all over the place 2022-07-08 21:03:04 +02:00
Aevann1 35e2e12e24 OPs can now rehole their posts 2022-07-04 04:19:43 +02:00
Aevann1 a0cb5874cc refactor push notifs 2022-06-27 21:02:24 +02:00
Aevann1 9593dc58dd move regex from helpers.const into its own helper file 2022-06-24 16:30:59 +02:00
Aevann1 0e1177843e remove the need for alert flag on sanitize() 2022-06-23 00:12:47 +02:00
Aevann1 365d21ff9c fix this https://i.imgur.com/F0OiGKH.png 2022-06-22 23:00:09 +02:00
Snakes 4db48a6ec9 Separate modaction notifs from inbox. 2022-06-10 08:28:46 -04:00
Aevann1 4a1e6cc726 a 500 error is much better than an XSS, bro 2022-06-07 12:03:51 +02:00
Snakes 227ddbec0e Truncate notifs with too-long bodies.
In general, we don't do a great job of length validating body_html
fields. Lots of ways to get 500 errors by providing too long of
input. Really ought to find a way to fix it in the classes/comment.py
and classes/submission.py classes. In the interim, the recent gifts
messages change is salient because the notification can 500 out
mid-way through performing coin transactions.

Recommended to find a better way of truncating or safely bubbling
the exception up. Truncating probably not best long-term solution
because it could hypothetically permit strings that would otherwise
be considered unsanitized.
2022-06-01 00:54:05 -04:00
Aevann1 cd2380fb33 fds 2022-05-28 04:20:31 +02:00
Aevann1 4cc4f8f14f sfd 2022-05-08 06:01:42 +02:00
Aevann1 6b10d097a2 mn 2022-05-05 01:09:46 +02:00
Aevann1 cc3788bd8d fds 2022-04-20 00:23:25 +02:00
Aevann1 889a8948c4 fsd 2022-04-04 03:41:20 +02:00
Aevann1 b02b27ce4f fds 2022-03-31 17:00:57 +02:00
Aevann1 ec80510e4b fds 2022-03-21 22:56:43 +02:00
Aevann1 83c88a9834 sfd 2022-03-17 18:30:13 +02:00
Aevann1 e1722e50dc fd 2022-03-09 04:24:58 +02:00
Aevann1 b35bab0672 hole 2022-03-09 04:04:37 +02:00
Aevann1 e290995d6d ki 2022-03-06 21:22:33 +02:00
Aevann1 17d6fc3dc6 bruh 2022-03-06 00:19:07 +02:00
Aevann1 35ec2a7712 fart 2022-03-05 00:46:20 +02:00
Aevann1 6d6b199a3b transfers fix 2022-03-04 18:53:28 +02:00
Aevann1 70caa241da gf 2022-03-01 02:20:11 +02:00
Aevann1 c22f4e4e95 created 2022-03-01 02:06:50 +02:00
Aevann1 94f2a69167 N 2022-03-01 01:30:44 +02:00
Aevann1 ddbb610142 regex 2022-02-27 23:57:44 +02:00
Aevann1 e0dfe332c2 cope 2022-02-26 20:53:17 +02:00
Aevann1 14c7148eed fd 2022-02-24 10:28:13 +02:00
Aevann1 bfacc5c33f fd 2022-02-23 07:43:38 +02:00
Aevann1 5d4b09ef62 fd 2022-02-23 07:02:07 +02:00
Aevann1 833009bd14 gdf 2022-02-21 03:58:12 +02:00
Aevann1 b48cc5314f bv 2022-02-21 03:35:01 +02:00
Aevann1 729e4a4c62 g 2022-02-16 03:16:01 +02:00
Aevann1 04a1b875ef sfd 2022-02-04 11:15:59 +02:00
Aevann1 73bd87c4bd sdf 2022-02-02 00:59:06 +02:00
Aevann1 50a7cfc0c1 xvc 2022-02-01 02:07:15 +02:00
Aevann1 59027a7276 fds 2022-02-01 02:03:39 +02:00
Aevann1 26bfdd4f33 sfd 2022-02-01 01:10:24 +02:00
Aevann1 cfb33e90d8 vvvvvvvvvvvvvvv 2022-01-27 19:04:02 +02:00
Aevann1 06fa3e38fc vc 2022-01-17 21:05:16 +02:00
Aevann1 92a24b5b2f bbb 2022-01-14 08:40:30 +02:00
Aevann1 0e5218b2dc bbbb 2022-01-11 21:46:50 +02:00
Aevann1 b446532ad2 bb 2022-01-09 23:06:21 +02:00
Aevann1 8a0d51c4e0 cvxx 2022-01-07 21:13:01 +02:00
Aevann1 9126a7d984 sfd 2022-01-06 22:05:57 +02:00
Aevann1 84d20891b5 fsd 2022-01-06 22:01:56 +02:00
Aevann1 2c7a98e433 big one 2022-01-06 18:46:09 +02:00
Aevann1 38cb9f40f8 sdf 2022-01-04 15:20:01 +02:00
Aevann1 c92c96b498 fds 2022-01-04 15:18:37 +02:00
Aevann1 6357a86ecf fds 2022-01-04 15:13:02 +02:00
Aevann1 d2167f3af4 dfs 2022-01-04 14:34:53 +02:00
Aevann1 a15c3914ce sfdfds 2022-01-04 14:30:08 +02:00
Aevann1 0ef1562a58 sfd 2022-01-04 14:29:28 +02:00
Aevann1 b2642af08e fds 2022-01-02 02:57:16 +02:00
Aevann1 00e5e1c048 fsd 2022-01-02 02:06:46 +02:00
Aevann1 169511e3ee sdf 2021-12-30 17:37:47 +02:00
Aevann1 8064ffead1 fds 2021-12-30 17:16:33 +02:00
Aevann1 2797adc57a fdsfds 2021-12-29 08:43:20 +02:00
Aevann1 143019a6ec sdf 2021-12-24 04:21:46 +02:00
Aevann1 3d9cb2fd5d fds 2021-12-24 04:19:42 +02:00
Aevann1 469040917e fds 2021-12-24 04:16:08 +02:00
Aevann1 21e03d621b dsffds 2021-12-20 22:34:22 +02:00
Aevann1 4135175d8a fdssfd 2021-12-20 22:03:59 +02:00
Aevann1 69a68e564c fdsfsd 2021-12-19 08:43:51 +02:00
Aevann1 6bc1122ad8 fdssdf 2021-12-17 20:10:22 +02:00
Aevann1 ecf2c96715 fdsfds 2021-12-17 20:04:42 +02:00
Aevann1 32b4b93592 fdsfds 2021-12-02 23:01:31 +02:00
Aevann1 d90218eaae fsdfds 2021-12-02 22:48:13 +02:00
Aevann1 0ff74da5b0 sfdfds 2021-11-24 00:44:16 +02:00
Aevann1 4aed6490ec fdsfdsfd 2021-11-24 00:36:38 +02:00
Aevann1 a25924c84b fsdfsd 2021-11-22 19:54:10 +02:00
Aevann1 aecd3968dc dsffds 2021-11-22 19:52:27 +02:00