Commit Graph

104 Commits (3627889b60dfff929480f88bf7b6cd8ff5b5aa5a)

Author SHA1 Message Date
Aevann1 3627889b60 use magick command 2022-12-16 23:21:47 +02:00
Aevann1 6a65a15852 fix 2022-12-16 22:11:38 +02:00
Aevann1 e5aa3c3e92 Revert "retvrn to imagemagick 6.9 as an experiment"
This reverts commit dcc087f6fd.
2022-12-16 20:13:58 +02:00
Aevann1 e85eb63fa3 end my misery 2022-12-16 19:58:20 +02:00
Aevann1 8dcc5ba0bb end my misery 2022-12-16 19:45:24 +02:00
Aevann1 8400cade0a try fix for imagemagick 2022-12-15 23:56:09 +02:00
Aevann1 c9bfd1ca33 addendum to last commit 2022-12-13 20:13:25 +02:00
Aevann1 dcc087f6fd retvrn to imagemagick 6.9 as an experiment 2022-12-13 20:05:13 +02:00
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 84b1d2a7d7 dont check badges for duplicate images 2022-12-10 10:26:55 +02:00
Aevann1 9f8d2fc8a0 increase max size for site assets from 500kb to 1MB 2022-12-07 22:53:52 +02:00
Aevann1 1a4600bd95 imagemagick is really cringe 2022-12-07 10:42:23 +02:00
Aevann1 ab51e97e09 better error message 2022-12-07 10:28:01 +02:00
Aevann1 94f788ffe9 use exiv2 to remove metadata instead of imagemagick, much much much faster 2022-11-28 05:49:17 +02:00
Aevann1 5f628d7c41 move purge_files_in_cache to the bottom 2022-11-22 17:49:15 +02:00
Aevann1 35f6b39d27 build imagemagick from source again 2022-11-20 23:35:09 +02:00
Aevann1 6b5a71c62e use imagemagick 7.1.0-52 instead of 6.9.11-60 (seems to have fixed the issues of images doubling in size) + don't recompress images that are already webp -- WARNING I HAVE NO IDEA WHAT IM DOING 2022-11-19 21:55:07 +02:00
Snakes b50a815eb0
Fix DB session for webm_to_mp4. 2022-11-15 06:24:17 -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 803ce06712
Sanitize more intermediate values.
Frankly, this is almost entirely speculative. I don't see any viable
exploits through either of these codepaths. But automated tooling
doesn't see the implicit constraints on these values, so might as well
do more sanitization.
2022-11-10 23:17:25 -05:00
Snakes 9f7adb2614
Fix recent CPU spikes from image encoding.
Certain animated images take an exceedingly long time (~minutes) to
encode to WEBP using method=6. Such a file was obtained, and it
encoded significantly faster using method=5 and somehow turned out
smaller than the result generated with method=6. We switch now to
use method=5 so we stop getting occasional massive increases in
CPU load when multiple users upload animations at the same time.

Additionally, a timeout was added to the ImageMagick subprocess just
in case there are even more pathological files in the future. Better
to error out than have to get someone to kill the process.
2022-11-06 00:48:54 -04:00
Aevann1 e182ddc738 fix orientation (thx sneks my love) 2022-10-25 22:19:16 +02:00
Aevann1 16c7c07e7d stop changing extension 2022-10-25 22:01:38 +02:00
Aevann1 100f546f67 strip metadata 2022-10-25 21:58:02 +02:00
Aevann1 3eb364b143 restore -coalesce 2022-10-25 21:00:09 +02:00
Aevann1 75ee126b61 specify method in imagemagick 2022-10-25 20:48:45 +02:00
Aevann1 0119c2b424 specify quality in imagemagick 2022-10-25 20:45:32 +02:00
Aevann1 b9d998bdbe use imagemagick in all cases 2022-10-25 17:41:23 +02:00
Aevann1 3b16c8f3e3 close image files after ur done 2022-10-25 17:41:23 +02:00
Aevann1 834f70fd2d only check duplicates for banners, sidebar images, and badges 2022-10-23 11:27:40 +02:00
Aevann1 2dcf6bcb0f make sure all images with resize parameter are under 500KB 2022-10-22 17:24:07 +02:00
Snakes 94e130febd
Fix video filesize check for patrons. 2022-10-18 22:15:57 -04:00
Aevann1 465160dbe6 dont include SITE_FULL in post urls 2022-10-18 13:09:53 +02:00
Aevann1 f2225e700a change MAX_IMAGE_SIZE_BANNER_RESIZED_MB into MAX_IMAGE_SIZE_BANNER_RESIZED_KB 2022-10-15 12:37:55 +02:00
justcool393 c56e45aa57 create cloudflare helper 2022-10-13 00:55:15 -07:00
justcool393 c67406b84b use site specific patron name 2022-10-12 03:45:45 -07:00
justcool393 96879894af remove 417 (use 409) and reword 418 msg 2022-10-12 02:00:18 -07:00
justcool393 5377472146 show correct max video size 2022-10-12 01:53:23 -07:00
justcool393 ca7fa50419 remove 414 and change 413 msgs
* use 413 for videos and put explanatory text there
* add style text for 413 as well
2022-10-12 01:52:08 -07:00
justcool393 dcd875c40c max image and video size are constants now
* the error pages still need to be fixed
2022-10-11 23:27:17 -07:00
Aevann1 0cb2a56f5c fix last commit 2022-10-11 19:28:08 +02:00
Aevann1 a9dd6bf1e7 add a media check 2022-10-11 19:26:38 +02:00
Aevann1 b544171449 store the fullpath in the media table 2022-10-11 19:20:15 +02:00
Snakes 60e4e92e90
Suppress ffmpeg progress output, fix trailing flag. 2022-10-06 15:17:36 -04:00
Aevann1 3cf838af29 fix thumbnails and add opera-proxy to docker 2022-10-06 21:07:45 +02:00
Snakes 24167b1d09
Fix thumbnail_thread passing uploader to media. 2022-10-06 05:15:21 -04:00
Aevann1 96f4f8499f fix 500 errors 2022-10-06 09:30:38 +02:00
Aevann1 3a4aa3f3af fix bugs 2022-10-06 08:00:41 +02:00
Aevann1 42344cb76f add media table 2022-10-06 07:54:04 +02:00
Aevann1 1d666b3569 fix prev commit 2022-10-06 07:23:05 +02:00