Commit graph

480 commits

Author SHA1 Message Date
justcool393
872d9c613b
videos: remove video uploads lol 2023-02-17 21:26:40 -06:00
justcool393
1574c46d0a modmail: constantify user ID and fix bug where users can bypass modmail route checks
the random c.sentto == 2 magic numbers in the code is... pretty
unmaintainable and unless you were aware of who "2" was, it's hard to
know what's going on.

in addition, we force modmail to go through the modmail path instead of
letting users bypass validation checks.
2023-02-17 14:41:41 -06:00
justcool393
c5cea4f8fa add SORTS_COMMENTS 2023-02-16 23:43:08 -06:00
justcool393
5f73302b28 Sorting: add comments sort for comments and constantify sorts 2023-02-16 17:52:43 -06:00
Snakes
84e5c7c651
Merge branch 'frost' into feature-award-feature-flag 2023-02-11 23:41:41 -05:00
justcool393
f8f55be8b0
constantify render depth limit 2023-02-10 13:54:49 -06:00
justcool393
f4445fd58e award feature: use feature flag in more places 2023-02-09 10:12:49 -06:00
justcool393
026a9efe2b user/submission/comment: avoid queries if awards are disabled 2023-02-08 17:54:12 -06:00
justcool393
86ea70dfd3 awards: remove all award definitions 2023-02-07 07:03:36 -06:00
faul_sname
b75c93e600 Merge remote-tracking branch 'origin/frost' into themotte-issue-451 2023-01-12 22:09:07 -08:00
justcool393
712a0ad631 awards: remove tilt award 2023-01-08 19:38:20 -06:00
justcool393
0ea72e3778
Debug: Add button in admin panel to login to other accounts (#437) 2023-01-08 03:16:02 -06:00
faul_sname
9468e217f0 [themotte/rDrama#451] Allow explicitly setting the scheme to http or https in env 2022-12-30 23:39:46 -08:00
justcool393
0c632d73b7
Rework error system a bit to remove a bunch of duplicated code (#434) 2022-12-01 20:58:27 -06:00
justcool393
8a9e1bc54a
titles: use rdrama's title finding code (#425)
* titles: use rdrama's title finding code
this fixes a potential DoS in some really weird pages (seems to be a bug with BS4)
we're not parsing arbitrary HTML
in addition we make some nice checks

* unescape title to fix bug from upstream

* fix nameerror

* Do not proxy requests, since no proxy available.

On the upstream, the `proxies` dict was intended to use a local SOCKS
proxy running on port 18080 with the express purpose of masking the
server IP address. TheMotte isn't running behind a reverse proxy, so
this purpose is moot. Additionally, we don't have a proxy running in
Docker nor do we appear to have one on prod, which breaks autotitle
and thumbnailing regardless--not sure it matters for TheMotte's
use case, but both codepaths have been inoperative because of it.

* use gevent to timeout the function to prevent a
second theoretical DoS by sending data rly slowly
ref: 816389cf28

Co-authored-by: TLSM <duolsm@outlook.com>
2022-11-28 07:52:15 -08:00
justcool393
2067875c6a themes: remove /r/Drama theme ("classic" and "classic_dark") 2022-11-21 06:13:12 -06:00
justcool393
65fada8155 awards: remove grass 2022-11-19 10:21:30 -06:00
Ben Rog-Wilhelm
7c72815dcc
Merge branch 'frost' into remove-more-dramaisms 2022-11-09 20:45:31 -06:00
TLSM
8949b57609 Remove unused ADMINISTRATORS content upload posts.
The ADMINISTRATORS list contained hardcoded post IDs (in the 30000s)
intended to be used for uploading graphical assets onto a production
instance of the site. This functionality is not needed here, and the
special logic to bypass awards when commenting on those posts was
largely removed in 9d4195a89f.
2022-11-09 20:37:04 -06:00
TLSM
3f360bb457 Remove special cases for unused awards.
Removes the following awards / fields on User:
 - flairlock
 - progressivestack
 - bird
 - longpost (pizzashill)
 - marseyawarded
 - rehab
 - deflector
 - mute
 - unmutable
 - eye (All-Seeing Eye)
 - alt (Alt-Seeing Eye)

Primarily motivated by starting to remove some un-Mottelike cruft
from core commenting/posting routes. Cleared out other inapplicable
awards while in the process.
2022-11-09 20:37:04 -06:00
TLSM
9de6f20dea Remove vestigial user ID special cases. 2022-11-09 20:37:04 -06:00
TLSM
010c56a35e Implement #380: remove signatures feature. 2022-11-09 20:37:04 -06:00
justcool393
793273f638 remove beano award (doesn't conflict with @TLSM's commit ☺) 2022-11-07 04:36:41 -06:00
FatherInire
b46ada9f72
Fix some deprecations and factor out a helper function (#387) 2022-10-27 22:15:48 -05:00
Jack Byrne
1b9f7860c5 nicer and more efficient sanitisation 2022-09-11 06:12:26 -05:00
Jack Byrne
8c7c76feb6 Remove (admittedly funny) rDrama 'troll titles' 2022-09-11 06:12:26 -05:00
TLSM
256a43527a Fix #303: remove WebP mangling of imgur links. 2022-09-10 08:01:52 -05:00
TLSM
e40228d7ee Remove slur replacer toggle from settings.
The Slur Replacer feature from rDrama has already been removed, but
the toggle for it in settings remained. A user in Discord pointed out
it was confusing and potentially disconcerting to have a default-on
toggle to 'enable slurs'.
2022-09-06 12:35:22 -05:00
TLSM
1d705588d4 Remove obfuscated auto-shadowban on keyword. 2022-09-05 23:44:18 -05:00
TLSM
70c8a942b6 Remove games.
Unfortunately not totally dead code paths, and special case behavior
for them complicated commenting and sorting logic in a number of
places.
2022-09-05 23:44:18 -05:00
TLSM
dbaf0a1bfd Remove unused polls code to reduce query volume.
Due to use of Submission.{choices, options, bet_options} in realbody,
generating submission_listings resulted in extremely high volume of
SELECT queries.

In local testing with 6 posts, one of which had a poll with 2 options,
the removal of these calls reduced quantity of queries on the homepage
from 84 to 22.

Given that it was previously decided to remove the polls feature after
a regression while adding comment filtering, the remaining dead code
paths for polls were also removed.
2022-09-05 23:44:18 -05:00
TLSM
129d644a3f Add active user counter logic; add to admin tools.
Ports in lightly modified logic from the upstream which tracks active
sessions to provide counters and listings to understand site traffic
in the admin panel.
2022-09-05 00:44:13 -05:00
Ben Rog-Wilhelm
d844b6c340 Remove culture-warrish instances of ussy and igger. 2022-08-07 02:09:05 -05:00
Michael House
10b5823721
Merge branch 'frost' into pr_sitename 2022-08-01 15:21:56 -05:00
Ben Rog-Wilhelm
800ae8d2dc Split SITE_NAME into computer-readable SITE_ID and human-readable SITE_TITLE. 2022-07-31 18:53:18 -05:00
Ben Rog-Wilhelm
8c818adbd2 Update welcome message. 2022-07-31 18:21:12 -05:00
Ben Rog-Wilhelm
f789252794 Remove the #fortune feature. 2022-07-23 06:00:38 -05:00
FatherInire
fcba426009
Remove some gimmicky r/drama features.
Co-authored-by: Inire <>
2022-05-21 21:43:00 -05:00
faul_sname
def7e3fd0e [#80] Replace borked email regex with something less borked 2022-05-17 19:00:23 -05:00
FatherInire
a12123ca01
Initial e2e testing
Authored by @FatherInire
2022-05-13 02:55:29 -05:00
iro84657
b7da8b575a Add trailing LF to text files 2022-05-10 21:05:51 -04:00
iro84657
4341e2d980 Remove special cases based on SITE 2022-05-09 01:40:09 -04:00
iro84657
71743a3bfc Remove special cases based on SITE_NAME 2022-05-09 01:40:09 -04:00
Aevann1
7d872bd6ef sfd 2022-05-02 22:02:22 +02:00
Aevann1
eb68ac3907 fsd 2022-05-02 21:30:12 +02:00
Aevann1
23cb88ee06 fgd\ 2022-05-02 07:06:43 +02:00
Aevann1
235349652b fds 2022-04-29 16:52:00 +02:00
Aevann1
349ca9e44b sfd 2022-04-28 01:16:24 +02:00
float-trip
d61222fc35
add :@userpat: emojis (#231)
* refactor emoji formatting

* add user patting
2022-04-27 16:46:47 +02:00
Aevann1
eae8a79db1 fd 2022-04-26 15:15:01 +02:00