Commit Graph

1250 Commits (8f2f48d6d1a1ab1e4e9f233e03fd3ac6cba1e282)

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 000b4f4c37 can post in ghost threads 2022-11-14 11:20:34 -06:00
Aevann1 41ab1f313c move feature_required wrappers up 2022-11-14 18:14:47 +02:00
Aevann1 ac8c1d524d "moved into cc" -> "marked as cc" 2022-11-14 07:49:23 +02:00
justcool393 39e7e61bcb posts: make ghost threads cost DC again
who the hell disabled this
2022-11-13 19:52:32 -06:00
Snakes cc8f2d1a6e
Restrict permabanned editing content. 2022-11-13 19:00:55 -05:00
Snakes 8fee66c894
Reorder decorators to support f63237a9a2.
Ultimately necessary because otherwise all bots share rate limits
with each other. The somewhat haphazard ordering of decorators bothers
me, but it's functionally required.

Approaches using request context (like reading the Authorization
header in ratelimit_user) likely produce bugs all their own.
2022-11-13 05:18:52 -05:00
justcool393 aa272729f1 default ratelimit and default ratelimit slower 2022-11-13 00:43:47 -06:00
justcool393 80d7d5281d ratelimit_user() wrapper 2022-11-13 00:07:15 -06:00
Aevann1 31e6ca0889 fix pinned comments logic 2022-11-12 13:33:18 +02:00
Aevann1 f9b673e33d allowing adding bets via edit 2022-11-12 12:30:05 +02:00
Aevann1 3f17624de6 validate poll options body_html length 2022-11-12 12:27:05 +02:00
justcool393 b1924e0cdf don't bother try checking invalid urls 2022-11-11 23:40:17 -06:00
justcool393 9f4d62d305 :) 2022-11-11 04:19:44 -06:00
justcool393 0cf37cfe5f fix for worker timeout 2022-11-11 04:19:44 -06:00
justcool393 0c7eab0def :pepodrool: 2022-11-11 04:19:43 -06:00
justcool393 f5912bb4cc we don't need bloody bs4 to get a bloody title 2022-11-11 04:19:43 -06:00
Snakes 439b73d6ae
Make explicit submission flag behavior.
Main intention is to allow API users (bots) to benefit from the
defaults typically enforced clientside, and to generally be clearer
about what values do what.
2022-11-11 00:23:03 -05:00
Aevann1 fd3edf51c9 minor bool change 2022-11-11 06:46:14 +02:00
Aevann1 254798d0d4 fix 500 error in WPD/PCM 2022-11-11 06:43:02 +02:00
Aevann1 c066227d2b remove pizza autovote 2022-11-09 23:27:16 +02:00
Snakes 4f0f4412c0
Fix /submit not testing `ghost` as boolean. 2022-11-09 16:24:35 -05:00
Aevann1 6694585434 make ghost threads free again 2022-11-09 21:19:29 +02:00
justcool393 26549a6e66
remove logged out routes (#433)
* remove /logged_out/ routes

* update sitemap, remove users route, and update header

* cloudflare cookie

* only mess with the cookie whenever we desire auth

* sitemap: (small) improvements
sitemap: fix little bug i introduced
sitemap: fix login redirects for /id/ routes

* sitemap: remove duplicate entry

* contact is auth desired

* imports: don't import what we don't need and bind late to the db

* praying to god this works

* keep yourself safe

* oh i actually need to commit and push lol

* import Sub

* t

* refix cache purger
2022-11-09 00:35:24 -05:00
Aevann1 d616086dbd fix logic for duplicate posts in localhost 2022-11-07 01:48:37 +02:00
justcool393 0b3fae81d6 's 2022-11-03 02:16:01 -05:00
justcool393 6d636e4e42 use charge_account everywhere 2022-11-01 00:25:19 -05:00
Aevann1 cc473795bf make banned domains case insensitive 2022-10-31 16:33:11 +02:00
Aevann1 b9c482712a constantify file extensions 2022-10-30 16:55:43 +02:00
justcool393 b9f2a7123e actions: move pizzashill autovotes to actions 2022-10-30 01:03:23 -05:00
Aevann1 d7091c4799 force posts by PERMA-chudded users to go to /h/chudrama 2022-10-30 00:17:16 +02:00
Aevann1 227d074da7 remove redundant "noreferrer" 2022-10-29 23:46:35 +02:00
justcool393 35e2128dec
get: use function to get voted and blocked properties (#425)
* get: comments and posts: use get function from get.py
* fix prev commit
* move filter to correct place
* fix error and also log so i can figure out what's wrong
* comments: add some more trace logging
* should_keep_func always acts as return True if None is passed in
* remove logging code
2022-10-28 19:13:37 -05:00
Aevann1 b816973f38 ignore subdomains in banned_domains logic 2022-10-28 20:12:40 +02:00
Aevann1 94d1a7d98d fix 2022-10-28 19:13:24 +02:00
Aevann1 8999a6ea29 fix 2022-10-28 19:08:52 +02:00
Aevann1 834516cd51 fix prev commit 2022-10-28 00:42:32 +02:00
Aevann1 1a35e2ec6a refactor banned domains 2022-10-28 00:37:29 +02:00
Aevann1 ad358650e1 remove retarded bullshit I wasn't consulted about 2022-10-27 19:53:08 +02:00
Aevann1 8795ecfb58 fix thumbnails 2022-10-26 16:34:33 +02:00
Aevann1 883ab31cc9 Describe what Poor Mode does 2022-10-25 20:20:43 +02:00
Aevann1 fbeac461ca refactor poorcel mode 2022-10-25 18:07:44 +02:00
Aevann1 3b16c8f3e3 close image files after ur done 2022-10-25 17:41:23 +02:00
gooseman 8b98eabbb9 simultaneous hosts 2022-10-24 15:28:43 -07:00
justcool393 ec1affcf85 posts: add MasterLawlz specific actions 2022-10-23 12:01:00 -05:00
Aevann1 7733449169 fix 500 error 2022-10-21 13:30:32 +02:00
justcool393 8fe73cb68e refactor blackjack a bit 2022-10-20 19:28:05 -05:00
justcool393 360cff7e8f add post bypass checking perm 2022-10-20 17:51:29 -05:00
Aevann1 465160dbe6 dont include SITE_FULL in post urls 2022-10-18 13:09:53 +02:00
Aevann1 3e7b37ec35 dont redirect to a repost for chadmins 2022-10-18 12:26:44 +02:00