Commit Graph

78 Commits (ab41db22b77a211e89e2b88a63a342f285d79868)

Author SHA1 Message Date
justcool393 ab41db22b7 [DO NOT MERGE] multiple sub banners (#59)
allows multiple sub banners

Snakes note: By request of Carp, especially for WPD.

Co-authored-by: justcool393 <justcool393@gmail.com>
Co-authored-by: Snakes <duolsm@outlook.com>
Reviewed-on: #59
Co-authored-by: justcool393 <justcool393@noreply.fsdfsd.net>
Co-committed-by: justcool393 <justcool393@noreply.fsdfsd.net>
2022-12-11 23:44:34 +00:00
Aevann1 5e52a86500 cleanup user ids in const.py 2022-12-10 16:00:03 +02:00
Aevann1 52f5b2a347 serve almost all files from nginx 2022-12-10 14:21:52 +02:00
Aevann1 391d646a2c order asset submissions by most recent last 2022-12-08 17:50:23 +02:00
Aevann1 69535a30f0 order assets submissions by most recent last 2022-12-08 17:05:23 +02:00
Aevann1 5e8f2d0681 clearer error message 2022-12-08 16:34:31 +02:00
Aevann1 9b5496b140 fix updating marseys that dont follow the naming convention 2022-12-08 15:55:30 +02:00
justcool393 767cc467bb marseys: cache marseys and emojis and fun stuff (#15)
Co-authored-by: justcool393 <justcool393@gmail.com>
Reviewed-on: #15
Co-authored-by: justcool393 <justcool393@noreply.fsdfsd.net>
Co-committed-by: justcool393 <justcool393@noreply.fsdfsd.net>
2022-11-27 16:59:36 +00:00
justcool393 0ff034b01b add typing to a bunch of routes 2022-11-26 15:00:16 -06:00
Aevann1 cb2fd8e43f increase approve hat ratelimit per minute from 30 to 120 2022-11-21 03:18:02 +02:00
Snakes db329f487f
User.pay_account everywhere, fix lottery payout. 2022-11-20 05:50:02 -05: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
Snakes 5e35342d2e Fix Cloudflare imports identifier shadow.
Proximal reason for fix is that /admin/clear_cloudflare_cache resulted
in infinite recursion and a stack overflow because it tried to call
itself as `clear_cloudflare_cache` rather than hitting the function of
the same name in files.helpers.cloudflare.
2022-11-07 17:30:15 -05:00
Aevann1 d76fe63c7f constantify image extensions and fix imgur .gif bug 2022-11-05 23:01:23 +02:00
justcool393 c2ae13363b fix 'none' sanity check from previous commit 2022-11-05 03:42:48 -05:00
justcool393 260091eaee assets: fix issue noted in 77e5da55ef
as it is, this is a backend issue. unforunately, there's no way in the UI that shows the name, image, or current tags, so that's why we insert it into the page

this change brings two ways to keep the current tag

as a sanity check: this also makes it so that you can't tag stuff as the string None
2022-11-05 03:37:03 -05:00
Snakes ac36b35588 Fix hat submission for some animated images. 2022-11-03 20:56:35 -04:00
justcool393 7f7180ea05 assets: fix *another* 500 2022-11-03 19:49:44 -05:00
justcool393 e639a8b870 assets: fix 500 for submitting marseys and hats 2022-11-03 19:42:58 -05:00
justcool393 5566fddbaa asset submissions: fix ImportError 2022-11-02 18:54:01 -05:00
Aevann1 141ec98c06 small dedup in asset_submissions 2022-11-02 00:27:42 +02:00
Aevann1 3b16c8f3e3 close image files after ur done 2022-10-25 17:41:23 +02:00
justcool393 a5799b222e hats: fix 2 500s (SQL errors) 2022-10-22 15:37:22 -05:00
Aevann1 2dcf6bcb0f make sure all images with resize parameter are under 500KB 2022-10-22 17:24:07 +02:00
justcool393 4f35819fee assets: use .get where we can instead of .query 2022-10-20 13:00:14 -05:00
justcool393 fc4e9866eb fix the fix 2022-10-20 09:59:14 -05:00
justcool393 d14eb65056 fix name bug with hats 2022-10-20 09:14:18 -05:00
justcool393 546883dcd5
fix fish's 500
im commiting this on my phone lol
2022-10-19 18:03:56 -07:00
justcool393 ffdf810aa9 fix 500 and populate page on error 2022-10-19 18:38:25 -05:00
justcool393 9627c6db01 don't pass for no reason and also marsey -> existing 2022-10-19 18:38:25 -05:00
justcool393 62bd5a34e8 g.db.query not g.db.get 2022-10-19 18:38:25 -05:00
justcool393 99f66c8d31 Add UI for updating marsey tags and also allow me to do it 2022-10-19 18:38:25 -05:00
Aevann1 44fca7f086 ripbozo 2022-10-17 21:13:33 +02:00
justcool393 f4af073253 fix 17 potential 500s 2022-10-16 02:51:42 -07:00
justcool393 3b86227872 refactor asset submissions a bit 2022-10-14 11:03:47 -07:00
Aevann1 5e55ff7f90 make the modlog note for updating assets link to te updated asset 2022-10-14 14:38:06 +02:00
justcool393 c56e45aa57 create cloudflare helper 2022-10-13 00:55:15 -07:00
justcool393 eebef17e8d another dumb syntax error 2022-10-11 08:40:19 -07:00
justcool393 c0acb1722b abort a bunch of stuff where we manually returned JSON 2022-10-11 08:40:19 -07:00
Aevann1 c381466389 tweak asset notifs 2022-10-10 14:13:43 +02:00
Aevann1 356c9f1219 add "(Admin)" to messages sent to users due to admin actions (for clarity to new users) 2022-10-10 08:11:17 +02:00
Aevann1 897885316f disable asset submissions in WPD and PCM 2022-10-08 03:00:27 +02:00
justcool393 c0f753e101 asset submissions permissions 2022-10-05 20:15:10 -07:00
justcool393 0349862531 view pending submitted marseys and hats perms 2022-10-05 19:55:54 -07:00
Aevann1 08d6a9c901 Revert "add nginx to docker"
This reverts commit 7c1eb4c6e3.
2022-10-04 21:35:02 +02:00
Aevann1 7c1eb4c6e3 add nginx to docker 2022-10-04 03:06:57 +02:00
justcool393 7e3f43c9ab
unperson shadowbanned users (#373)
* unperson shadowbanned users
if a shadowbanned user copes, does anyone hear them seethe?

* unperson shadowbanned users (by id)

* don't import that

* Add include_blocks.
We don't always want to request blocks from the db when we have a user set

* block shadowbanned users from hole mod tools

* don't allow awarding shadowbanned things

* fix conflict

* gracefully use get_account when specified and also add include_blocks flag to get_account as well
2022-09-30 14:00:58 -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 fa4dee419d remove unnecessary imports 2022-09-27 02:47:52 +02:00
Aevann1 8fcc91a43e reduce resize values 2022-09-26 03:15:36 +02:00