Commit Graph

1500 Commits (a6469085b3d7960feca3c4a7d4b9672e74936188)

Author SHA1 Message Date
Aevann 2cdbf9ed5d restore autopinning 2023-04-24 17:17:12 +02:00
Aevann 2949afaaca remove autopinning 2023-04-16 19:45:33 +02:00
Aevann c4263c9439 fix prev commit 2023-04-02 10:04:32 +02:00
Aevann 5bc6597188 add 1/1 second ratelimiter for user ids to fix blackjack exploit 2023-04-02 08:52:26 +02:00
Aevann 3b7569745e fix minor chud evasion exploit 2023-03-25 20:18:12 +02:00
Aevann f52aae0ec3 change autojanny chud message 2023-03-25 18:46:50 +02:00
Aevann 019253e6db use css for chud images instead 2023-03-24 14:29:19 +02:00
Aevann f5e507f795 fix 2 chud phrases 2023-03-23 17:36:28 +02:00
Aevann 4f788cb909 dedup chud-checking logic 2023-03-23 14:50:01 +02:00
Aevann f78cd322d1 much better chud award logic 2023-03-22 23:39:25 +02:00
Aevann 50680e0fa8 cut down on chud award evasion 2023-03-21 23:33:43 +02:00
Aevann 4c47cc5d63 stop implementing BAN_EVASION_DOMAIN since nobody actually uses it https://camas.unddit.com/#{%22searchFor%22:1,%22resultSize%22:100,%22query%22:%22stupidpol.site%22} 2023-03-21 17:39:26 +02:00
Aevann b004617695 customizable chud phrases 2023-03-19 19:13:45 +02:00
Aevann f5a68a7e79 fix 500 errors 2023-03-19 14:01:57 +02:00
Aevann 7dd5f179df pin RitalinRx posts 2023-03-16 15:38:49 +02:00
Aevann 57765f0776 revert sqlalchemy changes 2023-03-16 08:27:58 +02:00
Aevann a392fbb86d restore autoflush 2023-03-16 06:21:57 +02:00
Aevann c6a7051200 flush instead of committing inside requests 2023-03-15 07:19:35 +02:00
Aevann f768d81103 keep db sessions open 2023-03-15 05:58:00 +02:00
Aevann 4a756d742f extend under siege to new posts 2023-03-13 21:18:08 +02:00
Aevann 571ae603c7 fix this https://stupidpol.site/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/3770101#context 2023-03-12 11:40:30 +02:00
Aevann 25312029aa add poster_url for videos 2023-03-11 08:29:52 +02:00
Aevann 5708d4d64e dont wipe saved shit in /submit unless post is successful 2023-03-09 07:52:20 +02:00
Aevann d6afc9f1de remove pizza from autopin again 2023-03-08 08:02:26 +02:00
Aevann 77e7663476 remove leftover shit 2023-03-08 08:01:53 +02:00
Aevann cb5227fdc4 same as last commits 2023-03-07 03:24:02 +02:00
Aevann e4c8fab6dc same as last 2 commits 2023-03-07 03:17:51 +02:00
Aevann 393bb7b033 dont run thumbnail_thread from posts from the site itself 2023-03-07 03:12:56 +02:00
Aevann 355af22171 do this https://stupidpol.site/post/152490/downvoting-isnt-funny-its-just-annoying/3729531#context 2023-03-07 02:25:40 +02:00
Aevann aae979066e dont pin posts in /h/slavshit 2023-03-06 22:45:21 +02:00
Aevann a76729cda5 add IGNORE_1WEEk_EDITING_LIMIT perm 2023-03-06 22:22:15 +02:00
Aevann ce501ddf05 fix repost-detection in /submit 2023-03-06 02:00:01 +02:00
Aevann 0c91650a1d remove jc insanity 2023-03-06 00:50:06 +02:00
Aevann ff6c4f89ad repin pizzashill's posts 2023-03-03 22:11:43 +02:00
Aevann d7f42ac50a dont give shekels to ppl not notified bc of blocks + dont give shekels to ppl ALSO mentioned directly + prevent group double charging on edit + do this https://stupidpol.site/h/countryclub/post/79285/-/3695711#context 2023-03-02 21:56:43 +02:00
Aevann 308bb03125 add !everyone 2023-03-02 02:32:51 +02:00
Aevann cf9500ddbd enable notifs for ghost posts 2023-03-01 21:28:19 +02:00
Aevann 95bb5db1af remove intervention code for being not necessary anymore 2023-03-01 21:15:11 +02:00
Aevann 891fa80388 use "p" variable instead of "post" variabe for consistency 2023-03-01 00:37:12 +02:00
Aevann ff73022863 mive /edit_post and /edit_comment to the bottom 2023-03-01 00:22:59 +02:00
Aevann 55c8a51a1d make it possible to position poll options 2023-03-01 00:09:16 +02:00
Aevann 24c298f329 do this https://stupidpol.site/h/countryclub/post/79285/-/3681172#context 2023-02-28 21:36:14 +02:00
Aevann 86b0d2f5c1 fix comments not appearing 2023-02-27 18:16:12 +02:00
Aevann 984aecec9a destroy the shadow realm (#135)
Co-authored-by: Aevann <randomname42029@gmail.com>
Reviewed-on: rDrama/rDrama#135
2023-02-27 15:38:12 +00:00
Aevann 17bb6dad48 blackjack fix exploit 2023-02-27 07:33:45 +02:00
Aevann 6ac9b32834 allow positioning of files 2023-02-26 14:08:37 +02:00
Aevann fe0b8887bc change 1/second ratelimit to 1/2 second 2023-02-26 12:26:26 +02:00
Aevann fd9e1c3fec in push notifs: link the post I was mentioned in 2023-02-26 11:37:44 +02:00
Aevann 82a73392a9 fix errors 2023-02-26 10:49:09 +02:00
Aevann 8c495c914a default ratelimit doesnt apply implicitly if theres other @limiter.limit before the function, so add it explicity before all functions 2023-02-26 10:41:04 +02:00
Aevann 4c35f0b07f remove unnecessary line 2023-02-26 08:35:59 +02:00
Aevann 7aaeedea36 better ratelimiting 2023-02-26 03:42:39 +02:00
Aevann d2bda15383 remove unnecessary f 2023-02-24 04:54:31 +02:00
Aevann 3e7ccb7756 add push notifs to add_notif() 2023-02-24 04:28:10 +02:00
Aevann 81cc869fe2 make sure autojanny, zozbot, longpostbot add to the comment count of a post 2023-02-18 23:59:17 +02:00
Aevann d4913ce4ee constantify CASINO_RATELIMIT 2023-02-18 20:22:48 +02:00
Aevann 6af1954b8f Revert "bandaid fix to ping groups post"
This reverts commit 8205efa318.
2023-02-18 18:43:06 +02:00
Aevann d4210c2710 renamed p.embed_url to p.embed 2023-02-18 18:33:19 +02:00
Aevann d5d3e1f65e use abort in /submit 2023-02-18 01:25:01 +02:00
Aevann 8205efa318 bandaid fix to ping groups post 2023-02-11 08:55:37 +02:00
Aevann eb68c743e1 remove unnecessary return 2023-02-10 16:15:37 +02:00
Aevann 400ed01ed2 remove time measurement 2023-02-10 15:51:42 +02:00
Aevann a0378e83ab revert 2023-02-10 15:48:31 +02:00
Aevann e243458338 fix 500 error 2023-02-10 15:45:36 +02:00
Aevann 419f3da1e5 try to lower time it takes to load bug thread 2023-02-10 15:35:22 +02:00
Aevann 72097b4592 fix 2023-02-10 15:21:28 +02:00
Aevann f0b1870e92 fix 2023-02-10 14:06:27 +02:00
Aevann e1037467cc fix 2023-02-10 14:05:37 +02:00
Aevann 97cf5c89fe fix 2023-02-10 14:03:18 +02:00
Aevann 54800df9f0 measure /post time 2023-02-10 14:02:00 +02:00
Aevann 83195cded9 take pizza off the autopin list and up it to 1 hour again 2023-02-10 13:53:42 +02:00
Aevann b3f9fc88f0 reduce the autopin from 1 hour to 10 minutes 2023-02-09 15:47:19 +02:00
Aevann fc98963e7c remove unnecessary if condition 2023-02-09 07:12:37 +02:00
Aevann b79172a1a2 add 500MB limit in WPD 2023-02-08 18:54:11 +02:00
Aevann 42de90c955 remove print debugging 2023-02-08 18:26:14 +02:00
Aevann ea9cdea42b print debugging 2023-02-08 18:22:48 +02:00
Aevann c4394316fb add upload progressbar in /submit 2023-02-08 09:15:37 +02:00
Aevann 399d32eaf5 extend usage of features['NSFW_MARKING'] 2023-02-08 08:22:11 +02:00
Aevann 4c87ace27c remove ?all 2023-02-08 04:32:14 +02:00
Aevann 88814ee208 expand blackjack 2023-02-07 05:31:49 +02:00
Aevann 59fe09d0af disable NSFW marking in WPD 2023-02-01 20:52:34 +02:00
Aevann 8e5c00e351 pin snally posts 2023-01-29 18:29:17 +02:00
Aevann 349fa17836 use exlamation marks instead of dots in responses to users 2023-01-27 13:57:29 +02:00
Aevann b31405c23d rename handle_youtube to handle_youtube_links 2023-01-25 13:17:12 +02:00
Aevann a560958c3a fix youtube timestamps 2023-01-23 04:06:56 +02:00
Aevann a40dee5bd8 improve user ratelimiting 2023-01-21 06:39:46 +02:00
Aevann 4718576778 remove leftover discord shit 2023-01-20 07:41:45 +02:00
Aevann f17fade8a6 purge discord from site code 2023-01-20 07:31:53 +02:00
Aevann 044664a25e get rid of useless tabs and spaces 2023-01-01 13:36:20 +02:00
Aevann 8ee189022b seething hatred 2022-12-30 21:01:47 +02:00
Aevann c4872ecb07 Revert "attempt to fix ratelimiting user"
This reverts commit 99597fc36c.
2022-12-30 20:43:13 +02:00
Aevann 99597fc36c attempt to fix ratelimiting user 2022-12-30 20:40:58 +02:00
Aevann 9a8c986f93 attempt to fix ratelimiting user 2022-12-30 20:33:07 +02:00
Aevann 93e9a42fa3 stop using inline style/script elements 2022-12-29 16:20:27 +02:00
Aevann 909e3f5f29 use a cool flask feature i didnt know about 2022-12-29 12:39:10 +02:00
Aevann c1e147c190 dont pin agendaposter comment 2022-12-29 09:01:36 +02:00
Aevann f7aa7d8dfd better error messages 2022-12-28 11:50:48 +02:00
Aevann e3529d0495 use abort instead of return {"error": 2022-12-26 04:37:30 +02:00
Aevann 561b14cfd6 make post thumbnails not animated 2022-12-26 04:16:46 +02:00
Aevann 9af435adf0 im genuinely fucking retarded 2022-12-26 04:14:09 +02:00
Aevann ecf95ef51e force posts by @intervention into chudrama 2022-12-24 21:11:32 +02:00
Aevann a63b02470d use sets with in statements 2022-12-24 00:22:41 +02:00
Aevann e45fd63d64 do this https://watchpeopledie.tv/h/aftermath/post/17441/horribly-mangled-corpse-after-traffic-accident/344509 2022-12-23 02:47:01 +02:00
Aevann1 78e2fe9d5a remove unnecessary logic now 2022-12-16 16:48:17 +02:00
justcool393 7aa10b9d1b special logic redux (#76)
Co-authored-by: justcool393 <justcool393@gmail.com>
Reviewed-on: rDrama/rDrama#76
Co-authored-by: justcool393 <justcool393@noreply.fsdfsd.net>
Co-committed-by: justcool393 <justcool393@noreply.fsdfsd.net>
2022-12-15 22:56:04 +00:00
justcool393 82f34d0cab submissions: special posting sub logic by request (#75)
Co-authored-by: justcool393 <justcool393@gmail.com>
Reviewed-on: rDrama/rDrama#75
Co-authored-by: justcool393 <justcool393@noreply.fsdfsd.net>
Co-committed-by: justcool393 <justcool393@noreply.fsdfsd.net>
2022-12-15 22:51:59 +00:00
Aevann1 a71b21c1b6 fix JC bug 2022-12-14 20:24:14 +02:00
Aevann1 0376124eb0 clearer notifications for hole and admin actions 2022-12-13 19:11:26 +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 d59543891f add BAN_EVASION_FULL constant 2022-12-11 20:56:04 +02:00
Aevann1 02eb014dd8 posters for videos 2022-12-10 21:39:30 +02:00
Aevann1 3e3d39e432 minor /set_new rework 2022-12-10 16:57:19 +02:00
Aevann1 2525db6b07 give ppl a notif when janny toggles nsfw on their posts 2022-12-10 16:47:20 +02:00
Aevann1 5e52a86500 cleanup user ids in const.py 2022-12-10 16:00:03 +02:00
Aevann1 ff2ced1911 fix 500 error 2022-12-10 10:24:29 +02:00
Snakes f06da51288 vid-thumbs: suppress ffmpeg stdout, fix vid toggle
Previous behavior on submission_listing was clicking a thumbnail would
toggle an inline video player. This was retained for clicking the
thumbnail off the `.video-play` element; however, directly clicking
the `.video-play` did not have the `toggleVideo` onclick event attached
and would navigate the browser to the video file directly.
2022-12-10 04:05:46 +00:00
Aevann1 37cedaee9f add thumbnails for videos on the frontpage 2022-12-10 04:05:46 +00:00
Aevann1 14d343dcb3 dont change titles for chudded ppl posting on /h/chudrama 2022-12-05 03:21:47 +02:00
justcool393 ed0981cbdb add functionality to disable poll formatting (#35)
Co-authored-by: justcool393 <justcool393@gmail.com>
Reviewed-on: rDrama/rDrama#35
Co-authored-by: justcool393 <justcool393@noreply.fsdfsd.net>
Co-committed-by: justcool393 <justcool393@noreply.fsdfsd.net>
2022-12-04 21:46:27 +00:00
Aevann e105035272 remove country club system and replace it with a 3 tier thing: (#41)
- /h/masterbaiters: 1 TS - for gayops

- /h/countryclub: 1000 TS - for anything requiring secrecy and doesnt need critical mass - have to make it a rule that u cant post gayops in /h/countryclub

- /h/chudrama: 5000 TS - for chad+stud posts

EDIT: i removed the /h/masterbaiters gate, but u can bring it back if u want
Co-authored-by: Aevann1 <randomname42029@gmail.com>
Co-authored-by: Snakes <duolsm@outlook.com>
Reviewed-on: rDrama/rDrama#41
Co-authored-by: Aevann <aevann@noreply.fsdfsd.net>
Co-committed-by: Aevann <aevann@noreply.fsdfsd.net>
2022-12-04 18:39:06 +00:00
Aevann1 2deba4d623 "megathread" new sort 2022-12-04 00:01:08 +02:00
Snakes 71738b05fc
Fix 500 on all non-holed post submissions. 2022-12-01 17:12:57 -05:00
justcool393 0f2f72f2c3 sort by new button (#34)
also get rid of megathread logic

do the needful and do
```sql
UPDATE submissions SET new=true WHERE title LIKE 'Thread' OR title ILIKE 'megathread';
```
or whatever the proper equivalent is

Co-authored-by: justcool393 <justcool393@gmail.com>
Reviewed-on: rDrama/rDrama#34
Co-authored-by: justcool393 <justcool393@noreply.fsdfsd.net>
Co-committed-by: justcool393 <justcool393@noreply.fsdfsd.net>
2022-12-01 22:04:10 +00:00
Aevann1 e125443d50 make Thread (upper case) sort comments by new, around 20% false positive rate but worth it 2022-12-01 19:49:26 +02:00
Aevann1 3308734dc7 dont auto-pin if post sub is stealthed 2022-12-01 18:22:33 +02:00
Aevann1 845e13b4ae minor bug fix 2022-12-01 14:27:15 +02:00
justcool393 69a44baea7 settings: convert all to snek_case 2022-11-30 12:26:07 -06:00
justcool393 0106a4e340 antispam: under siege mode 2022-11-30 11:37:35 -06:00
Aevann1 ff2503ce4b fix 500 error 2022-11-29 03:47:54 +02:00
Aevann1 be8be13a01 move pinned comment ordering to SQLAlchemy 2022-11-29 02:04:06 +02:00
Aevann1 4656fa0b8d pin posts by pizza/impassionata/TGTW automatically for 1 hour 2022-11-28 04:07:06 +02:00
Aevann ca8c8297c5 sort pinned top-level comments by most recent first 2022-11-28 01:16:49 +02:00
justcool393 0ff034b01b add typing to a bunch of routes 2022-11-26 15:00:16 -06:00
Aevann1 d624dbe2de fix this https://rdrama.net/post/125682 2022-11-26 08:11:00 +02:00
Aevann1 a641acaf8f use sets instead of lists in some statements 2022-11-26 06:52:47 +02:00
Aevann1 642d19b861 move ratelimit_user after auth 2022-11-26 01:37:04 +02:00
Aevann1 e4b521a63f limit polls to 10 options to prevent spam 2022-11-25 23:33:38 +02:00
justcool393 816389cf28 security: fix DoS on title getter
the `timeout` parameter only applies to seconds per *byte* received (and time to first
byte), not the entire request

this means an attacker could theoretically send a very... slow...
stream... of... bytes... and... crash... the... worker... when... the...
timeout... is... reached...
2022-11-25 07:10:05 -06:00
justcool393 427d8f643d ratelimiting: use ratelimit_user everywhere 2022-11-21 09:30:27 -06:00
Aevann1 1de69518be stop forcing posts in /h/chudrama 2022-11-21 16:13:21 +02:00
Aevann1 caabaf0c6f expand IS_LOCALHOST 2022-11-21 00:16:49 +02:00
Aevann1 0be653e632 remove unecessary request when making a post linking to a yt video 2022-11-19 06:44:07 -06:00
Aevann1 2fd63d7474 I hate you and I hope you die a violent death 2022-11-18 23:11:03 +02:00
justcool393 83963470e8
user can_view functions (#460)
* user: move can_see_to user class

* stub out can_see in comments and posts

* make can_see a classmethod so it's usable for loggedoutfriends

* test

* kill me now

* threelargeclassesmating

* dfdfdfdfdfdfd

* sdsdsdsd

* classmethod should be above i think

* Revert "classmethod should be above i think"

This reverts commit df1772eb9e7e71bf7b89123f6277b648de2b1af3.

* Revert "Revert "classmethod should be above i think""

This reverts commit 32883406c2e2916fc6c436611376a1817c16cb84.

* test rewritnig thing

* go home python

* what the fuck python

* fix AttributeError

* sdsdsdsdsdsd

* lazy and user and stuff

* test

* Revert "test"

This reverts commit 45af5bb3d45f3ec17126ab117d494ec978062a38.

* merge

* newline

* test

* test 2

* Revert "test"

This reverts commit 196dae677e2ee8cd29261c93dcb747087cb399b6.

* revert test

* fix merge error

* fix import error ciruclation i think

* sdsd

* add type annotations back

* deleted_utc

* isinstance

* user_can_see in jinja and remove unnecessary things

* a bunch of stuff
remove can_see from comment and post
expand can_see to messages

* antiannoyingamountsofwhitespace

* fix for chudrama

* improve prev
2022-11-17 16:02:08 -05:00
justcool393 caf3a81748 remove unnecessary fstrings
(or actually use the feature)
2022-11-17 10:01:03 -06:00
justcool393 b2d0671734 merge fix: remove a couple of unnecessary from flask import *s 2022-11-15 05:28:45 -06:00
justcool393 781daeed2f fix thumbnail thread redux i think 2022-11-15 04:57:49 -06:00
justcool393 60748e4135 add TODO for migration of old comments 2022-11-15 04:43:19 -06:00
justcool393 168e5d04b9 give the thumbnail thread their own db_session 2022-11-15 04:34:35 -06:00
Snakes e896aaa1f7
Fix comment rendering when pin.level > 1. 2022-11-15 05:29:47 -05:00