forked from rDrama/rDrama
1
0
Fork 0
Commit Graph

234 Commits (6b3b0932af58a90cb78a024e707d1d0f225e03f8)

Author SHA1 Message Date
Aevann 9cee89afc5 increase max video size to 100MB 2023-06-07 05:56:42 +03:00
Aevann 2067638d4c Revert "migrate images again"
This reverts commit 240bd7354c.
2023-05-17 09:12:17 +03:00
Aevann 240bd7354c migrate images again 2023-05-16 11:47:16 +03:00
Aevann 1880048bf1 get rid of imei.sh and put the binary in the repo 2023-05-15 02:46:21 +03:00
Aevann 519fbef9a7 rename dm_images to dm_media 2023-05-12 18:27:46 +03:00
Aevann b4ef8c53de fix error message 2023-05-11 16:57:53 +03:00
Aevann 002fabaf0e test webhook 2023-05-09 23:12:34 +03:00
Aevann b851f35372 increase daily file limit from 75 to 100 2023-05-09 22:46:30 +03:00
Aevann f3a0080698 remove useless tabs 2023-05-06 00:47:07 +03:00
Aevann 26dae77c86 easier panel 2023-05-05 04:32:57 +03:00
Aevann 0dc8b5ccb1 don't use pomf for DM images anymore and allow for video and audio in DMs 2023-05-05 00:52:37 +03:00
Aevann f834514e1a fix deleting media 2023-03-25 17:07:12 +02:00
Aevann 54cd63093f increase daily file limit to 75 2023-03-22 09:47:22 +02:00
Aevann 0a12e0c069 fix minor annoyance when uploading files 2023-03-21 20:35:31 +02:00
Aevann a88fb10455 restore autoflush 2023-03-18 15:11:30 +02:00
Aevann 2c95c75940 stop asset submissions from erroring 2023-03-18 07:42:34 +02:00
Aevann 335c572aaf fix undefined variable 2023-03-18 07:41:22 +02:00
Aevann 8d096e1123 put a space before file link too 2023-03-17 19:40:55 +02:00
Aevann 0b0ad438a8 add SITE_FULL_IMAGES const 2023-03-17 17:57:31 +02:00
Aevann 127eae8379 fix image upload in localhost 2023-03-17 15:04:58 +02:00
Aevann bdeb32b3cf in process_dm_images, check if it is actually an image (using pillow) 2023-03-17 13:00:54 +02:00
Aevann 9e30061d6d remove conditions from "except" to make sure the file removal always happens 2023-03-17 13:00:10 +02:00
Aevann 023b398759 remove Media query i dont remember the purpose of 2023-03-17 12:50:49 +02:00
Aevann 32910c5cf5 remove new files if they exist too 2023-03-17 12:50:19 +02:00
Aevann 0dc9e1e35a wipe metadata from audio files - also serving as anti-malware 2023-03-17 12:50:13 +02:00
Aevann 3eabcdb950 dont use remove_media in media.py 2023-03-17 12:25:31 +02:00
Aevann 1190c9d063 wrap all subprocess commands we use in media.py in try except to delete old files 2023-03-17 12:23:06 +02:00
Aevann 3365e933df only use audio/video extensions that CF caches by default 2023-03-17 11:39:01 +02:00
Aevann 57765f0776 revert sqlalchemy changes 2023-03-16 08:27:58 +02:00
Aevann 3de34c9a65 Merge branch 'keep-session-open' of https://fsdfsd.net/rDrama/rDrama 2023-03-15 08:02:47 +02:00
Aevann f5682dd483 fix video and audio links 2023-03-15 08:00:02 +02:00
Aevann f768d81103 keep db sessions open 2023-03-15 05:58:00 +02:00
Aevann 903fb21961 fix images again 2023-03-15 05:07:43 +02:00
Aevann bc9eeba998 same as last commit 2023-03-15 04:53:37 +02:00
Aevann 77d8dd8737 print debugging 2023-03-15 04:53:15 +02:00
Aevann 59159ee79b fix last commit 2023-03-15 04:49:26 +02:00
Aevann da19ef96d1 fix images again 2023-03-15 04:46:54 +02:00
Aevann b48a7dd129 fix images 2023-03-14 15:35:31 +02:00
Aevann 60c2f7e628 same as last commit 2023-03-14 10:19:02 +02:00
Aevann 4644e62c99 fix last commit 2023-03-14 10:11:45 +02:00
Aevann 5ce067ed70 remove file size alerts 2023-03-14 08:19:01 +02:00
Aevann 97608ea0a9 test getting rid of ![]( on devrama 2023-03-12 15:02:31 +02:00
Aevann 349d1975d7 fucking 2023-03-07 22:38:22 +02:00
Aevann 3afecb326b fix videos and image on WPD 2023-03-07 22:33:12 +02:00
Aevann 042e779ca3 increase threshold for size printing 2023-03-07 12:20:42 +02:00
Aevann 92ac8d1dcc convert KB values to int 2023-03-07 07:19:47 +02:00
Aevann 4909db3e1e print sizes in KB 2023-03-07 03:53:05 +02:00
Aevann 57908aabf2 exclude jannoids with USE_ADMIGGER_THREADS perm from 50 files ratelimit 2023-03-07 02:46:51 +02:00
Aevann 1738f11f9c put the abort after the printing in media_ratelimit 2023-03-07 02:46:09 +02:00
Aevann e3fbc1a965 restrict printing to only large size difference 2023-03-07 02:21:12 +02:00
Aevann d3b14c3f30 use the i subdomain in rdrama only 2023-03-06 23:48:31 +02:00
Aevann 5d266835d0 print to console when size after conversion is higher than size before 2023-03-06 22:49:34 +02:00
Aevann 2ac830467b use STARS const 2023-03-06 22:49:01 +02:00
Aevann 873292d60d make remove_media() to fix 500 error 2023-03-06 21:32:08 +02:00
Aevann 4b6384d71d stop auto-apppending ![](, pointless now 2023-03-06 20:48:31 +02:00
Aevann 9117fd21cc fix all videos on wpd 2023-03-06 19:24:49 +02:00
Aevann a6121849d4 make image on localhost work 2023-03-06 19:20:06 +02:00
Aevann da806fbf4d fix cutoff 2023-03-06 18:58:27 +02:00
Aevann 5d9f9ef414 give the url of the existing image in the error 2023-03-06 18:37:43 +02:00
Aevann 9939614711 use i. subdomain for images 2023-03-05 21:33:18 +02:00
Aevann 0084de4273 add print statement to duplicate detection 2023-03-05 12:11:50 +02:00
Aevann 2d9580c30c print to console when 50 limit is hit 2023-02-27 18:25:58 +02:00
Aevann 8342e8b7c3 increase the limit from 8 files to 20 files 2023-02-27 18:05:28 +02:00
Aevann 5b71b0a81a refactor file upload 2023-02-27 17:02:35 +02:00
Aevann 6e200d332e use [file] instead of <file> 2023-02-27 07:24:26 +02:00
Aevann 1125d4e0e3 fix text-only messages not working 2023-02-26 14:54:36 +02:00
Aevann aec0bbc7bd dont give error when body is missing <file> 2023-02-26 14:46:38 +02:00
Aevann 663cdde1f4 increase the limit for concurrent file uploads from 4 to 8 2023-02-26 14:19:30 +02:00
Aevann 6ac9b32834 allow positioning of files 2023-02-26 14:08:37 +02:00
Aevann a395c18955 remove unnecessary tabs 2023-02-22 19:27:33 +02:00
Aevann b0fdd78d8b log timestamp in dm_images 2023-02-22 19:21:16 +02:00
Aevann cd573133a9 fix images in modmail 2023-01-28 10:47:52 +02:00
Aevann c45cd0fde8 make a UI for /admin/dm_images 2023-01-27 14:24:39 +02:00
Aevann f8822ac14d add a ratelimit to media uploads 2023-01-25 17:13:24 +02:00
Aevann 8396126606 add dm images 2023-01-23 11:58:38 +02:00
Aevann 561b14cfd6 make post thumbnails not animated 2022-12-26 04:16:46 +02:00
Aevann a63b02470d use sets with in statements 2022-12-24 00:22:41 +02:00
Aevann1 e1fdd64d31 try to fix weird error 2022-12-21 19:05:50 +02:00
Aevann1 6df9ac1b53 stop using exiv2 2022-12-21 18:59:16 +02:00
Aevann1 46225890ef fix this https://stupidpol.site/h/classified/post/133139/sweet-sasquatch-statue/3279824 2022-12-21 18:47:13 +02:00
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: rDrama/rDrama#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