Commit Graph

967 Commits (585d8f96956ec29bc48bb28b0c486a0892c8ec8b)

Author SHA1 Message Date
Aevann ed16d42377 actually redirect to old_id instead of new_id 2022-12-25 06:37:29 +02:00
Aevann 987db717d6 use gevent for moving account shit 2022-12-25 06:25:47 +02:00
Aevann dc2c2fdc74 expand moving account shit 2022-12-25 06:02:33 +02:00
Aevann 715fecbb15 more detailed toast on banning/chudding 2022-12-25 00:45:01 +02:00
Aevann 7da9a224e9 don't cache user objects in redis 2022-12-24 18:53:13 +02:00
Aevann 9979efbf7a make it possible to edit badge attributes without removing and re-granting them 2022-12-23 03:01:24 +02:00
Aevann a54734c32f better caching for get_alt_graph 2022-12-22 23:24:36 +02:00
Aevann e6274e06f3 delete ability of jannies to clear internal cache 2022-12-22 22:52:36 +02:00
Aevann 92cbe64ac0 cache get_alt_graph for 1 hour 2022-12-22 22:44:37 +02:00
Aevann 0e6b144ed7 alt graph 2022-12-22 22:03:40 +02:00
Aevann1 1dab4f7804 fix last commit 2022-12-21 18:17:14 +02:00
Aevann1 faf17f420c add notification for make_admin and remove_admin 2022-12-21 16:38:02 +02:00
Aevann1 3ae5292ce4 remove pcm from code 2022-12-21 14:42:41 +02:00
Aevann1 e832be4c18 restore badge rate limit 2022-12-19 15:55:39 +02:00
Aevann1 54e3a7eeab fix 500 error 2022-12-18 19:01:06 +02:00
Aevann1 4a334133bc same as last commit 2022-12-18 18:47:11 +02:00
Aevann1 31aa9b09a8 relax ratelimit for badge_grant 2022-12-18 18:46:44 +02:00
Aevann1 9974f98b8c Revert "Revert "remove the logic for fixing old mentions""
This reverts commit 5e9e1872af.
2022-12-17 21:11:22 +02:00
Aevann1 5e9e1872af Revert "remove the logic for fixing old mentions"
This reverts commit 90f6f0b96e.
2022-12-17 21:05:29 +02:00
Aevann1 b6c01fb275 clicking twice shouldn't generate a mod log 2022-12-16 22:17:03 +02:00
Aevann1 90f6f0b96e remove the logic for fixing old mentions 2022-12-16 19:50:34 +02:00
Aevann1 8660fcaa2e fix old mentions 2022-12-16 19:47:40 +02:00
Aevann1 7c389bbdfd fix old mentions 2022-12-16 19:43:06 +02:00
Aevann1 bd8ac649d4 order punished listings by truescore instead 2022-12-15 20:31:58 +02:00
Aevann1 1773632a75 remove punished listings filtering 2022-12-14 15:17:39 +02:00
Aevann1 df804c3179 minor change to punished listings 2022-12-14 15:12:02 +02:00
Snakes cf5eff3f48
Revert "better shadowban propagation"
This reverts commit 129f335363.

If there exists a loop in alts, this sends a worker into an infinite
loop, thrashes the database, and eventually crashes the worker. This,
in practice, makes shadowbanning people with many alts impossible since
our alt linking algorithm almost explicitly creates cycles rather than
maintaining a tree.

To fix this, we need SQL that builds a set of all Users in the
connected Alt graph of a given user (likely using a recursive CTE)
and then bans them at once, rather than running a depth-first search
with maximum depth that doesn't remember previously visited nodes.

There is also potentially the chance that this isn't because of cycles
per se but rather because quintic polynomial behavior explodes quickly
even in the low-double-digits number of alts.
2022-12-13 23:21:53 -05:00
Aevann1 b923776e71 simplify punished listings 2022-12-14 00:29:56 +02:00
Aevann1 c10c00473a make is_banned fkey on user id 2022-12-14 00:02:53 +02:00
Aevann1 129f335363 better shadowban propagation 2022-12-13 23:12:58 +02:00
Aevann1 b531d38384 small change to punish listings 2022-12-13 20:54:18 +02:00
Aevann1 36fca9caab minor bugfix 2022-12-13 20:50:38 +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: #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 033e4dd35c disable janny chudding in /h/chudrama 2022-12-10 15:06:30 +02:00
Aevann1 b2591daa2b filter 0 truescore from punishment listings 2022-12-10 10:57:48 +02:00
Aevann1 45be6970d6 punished users listing fixes 2022-12-10 10:23:56 +02:00
Snakes 39a0832223
Sort banned, chudded, etc listings by activity.
The listings of users affected by jannied states are long. To make
them more useful, sort by recent user activity (when v is allowed to
view last_active) to know which accounts are still in use.
2022-12-09 23:47:31 -05:00
Aevann1 25cd81e326 dont allow admins to remove themselves 2022-12-09 07:58:44 +02:00
Aevann1 f95f4f2c97 simplify badge granting/removal 2022-12-07 21:03:06 +02:00
Aevann 18df70caab allow JL3 to edit rules (#39)
Co-authored-by: Aevann1 <randomname42029@gmail.com>
Reviewed-on: #39
Co-authored-by: Aevann <aevann@noreply.fsdfsd.net>
Co-committed-by: Aevann <aevann@noreply.fsdfsd.net>
2022-12-05 05:22:08 +00:00
Aevann1 3971607aee fix agendapostered wall comments 2022-12-05 05:08:06 +02: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: #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 3542703ced Revert "make it so only the post author can declare winner and not all admins"
This reverts commit 9e1425d93e.
2022-12-03 00:08:46 +02:00
Aevann1 9e1425d93e make it so only the post author can declare winner and not all admins 2022-12-03 00:06:57 +02:00
Aevann1 87ae34966b badge perm shit 2022-11-30 23:15:10 +02:00
justcool393 0106a4e340 antispam: under siege mode 2022-11-30 11:37:35 -06:00
Snakes 9fcdd65d38
PCM: improve Kippy's inflationary ergonomics. 2022-11-29 17:18:33 -05:00
justcool393 5056f09380 chat: fix 500 on some... weird... state... i think?
cache: get out of jinja templates
chat: threshold is now a const
2022-11-29 15:49:23 -06:00
Snakes 0dd7809b49
Sort banned_domains deterministically. 2022-11-29 16:24:13 -05:00
Snakes 7551add5d8
Unify admin badge page listings source. 2022-11-27 17:02:18 -05:00
Snakes 427f54175c
WPD: constantify badge whitelist, extend set. 2022-11-27 16:49:20 -05:00
Aevann1 61612e7be3 fix missing "+ 1" 2022-11-27 02:19:50 +02:00
Aevann1 bcbf524fbe make sure stickied child comments are always at the top place they can be 2022-11-26 06:01:20 +02:00
Aevann1 bf72234873 remove SITE url from badge urls to make them relative in the event of a future domain change 2022-11-26 03:45:20 +02:00
Aevann1 bf4031c832 remove annoying excalmation sign in notifs 2022-11-26 01:18:24 +02:00
justcool393 6acd896967 sbs: since propagation isn't optional anyway, let's propagate on a ban to get their alts 2022-11-22 09:51:44 -06:00
Aevann1 0b1f166211 remove "alts" checkbox for shadowbanning since shadowbans propagate anway via check_for_alts() 2022-11-22 17:44:16 +02:00
justcool393 272e2ee936
sneed (rename procoins to marseybux) (#472)
* sneed (rename procoins to marseybux)

* literally unusable

Co-authored-by: TLSM <duolsm@outlook.com>
2022-11-21 18:08:29 -05:00
justcool393 153fb4e2a2
[DO NOT MERGE] titlesssssssssss (#468)
* titles

* testing

* self

* Revert "self"

This reverts commit d6c12d5a5ba125feb44673f55e1fdac75f151cb5.

* Revert "testing"

This reverts commit 86d800f9fd552196b31f0e0b3891d4fc072a9bc0.

* testing on devrama

* rewrite the html head

* reference error or smth idk

* tempalte debug

* template debug redux

* default2

* rename default2 -> root, page title

* fix settings2

* include the set_variables block

* root scope variables 2

* test 3

* remove unnecessary set

* add pagetitles to all settings2 pages

* add pagetitle to casino

* remove bloat

* remove duplicate site name thingy

* page titles 2

* page titles 3

* remove duplicate imports and add page titles everywhere iirc

* ok but actually this time

* remove unnecessary newlines

* fix title lol

* >

* fsdfsfsfsfsfs

* fsfs

* template configurations

* fix 500

* reduce login template bloat

* move files and add status codes where needful

* move authfroms to login

* remove 2fa bloat

* verification code

* sign up fixes

* readability

* fssfsfsfs

* move forgot password to login/

* readability

* don't emit comments

* add page titles where needful

* gsgsgs

* modals: move to respective pages

* testing on devrama

* get home garbage out of title

* remove insane amount of icon duplication

* sign up text

* add votes pagetitle

* fix blank lines

* Revert "fix blank lines"

This reverts commit b2c54339970725d00b6fc82bb458c1757909952c.

* Fix blank lines on sign_up.html.

* title: votes.html more meaningful identifier.

* titles: Lottery, Directory, Notifications

* head final in submission.html

* fix missing comma

* >

* test

* title: /comments

* fsfsfsfsf

* titles: user_cards

* head: only load video and audio meta attributes if they actually exist

* titlessssss: /admin/lottery/participants

* titlessssssss: extra quote in search.html

* titlessssss: userpage voters.

* titties: /h/<sub>/{followers,blockers,exilees[sic]}

* test banner

* Revert "test banner"

This reverts commit c3d875d03f3e60d72a60dab7d28bf108554a5826.

* make submit.html inherit from default.html

Co-authored-by: TLSM <duolsm@outlook.com>
2022-11-21 02:52:22 -06:00
Snakes db329f487f
User.pay_account everywhere, fix lottery payout. 2022-11-20 05:50:02 -05:00
Aevann1 caff8815ee restore pinning to how it was before JC raped it 2022-11-19 17:36:37 +02:00
justcool393 750a87713f pins: fix removal behavior 2022-11-19 08:24:32 -06:00
justcool393 33878fcd02 remove unnecessary check 2022-11-19 07:46:23 -06:00
Snakes ce84861a44
admin_home: add git HEAD to server status. 2022-11-18 14:05:47 -05:00
justcool393 5dedde4691 admin: move admin pages to admin dir 2022-11-15 17:15:53 -05:00
justcool393 b2d0671734 merge fix: remove a couple of unnecessary from flask import *s 2022-11-15 05:28:45 -06: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
justcool393 c9ecb5d535
account linking improvements (#448)
currently account delinking is very messy and can sometimes just not work
we do codey stuff so it's not as bad
also we create a pretty page for mops to mop up borked account links

* alts: allow proper delinking

* fix prev commit

* url fix

* fix 500

* fixes

* :pepodrool:

* flag

* :pepodrool: redux

* sdsdsdsds

* correct endpoint

* fix html page

* alts: only adjust session history if flag is set

* fix 500

* allow relinking

* fsdsds

* :pepodrool: redux

* alts: don't fail if an alt isn't history

* use postToastSwitch + some API changes

* remove unnecessary variables

* d-none

* delink accounts mod action

* fa-link-slash

* alts: add form to create alt

* remove copied and pasted template

* rounded section

* UI improvement + fix

* \n

* fix status

* admin: remove duplicate route
admin: do a permissions check on 2 pages that need it
admin: set the manual flag for manually flagged alts

* variable change

* fix 500

* alts

* add shadowban icon to alt link tool

* shadowbanned tooltip

* add user info section

* fix 500, remove unnecessary form, and add alt votes button

* trans and also link to page

* margin

* sdsdsd

* stop the count

* fix prev commit

* with ctx

* plural

* alts

* don't show shadowbanned users to those who can't see them
this is... extremely rare and won't ever be seen in production however if perms were ever rearranged in the future, this keeps permissions correct

* shadowban check in alt list

* let shadow realm enthusiasts see shadowban alts

* sdsdsds

* test

* be graceful where needed

* sdsdsdsds

* alts: don't allow adding the same account
alts: clarify wording

* rename and reorder on admin panel

* EOL

* remove frankly unnecessary check

* try with a set

* test

* Revert "try with a set"

This reverts commit 72be353fba5ffa39b37590cc5d3bf584c94ee06e.

* Revert "Revert "try with a set""

This reverts commit 81e41890a192e8b46d0463477998e905fddf56ba.

* Revert "Revert "Revert "try with a set"""

This reverts commit be51592135a3c09848f993f0154bd2ac862ae505.

* clean up test
2022-11-14 12:32:13 -05:00
Aevann1 41ab1f313c move feature_required wrappers up 2022-11-14 18:14:47 +02:00
justcool393 aa272729f1 default ratelimit and default ratelimit slower 2022-11-13 00:43:47 -06:00
Aevann1 42e40c1691 split off muting and unmuting 2022-11-12 11:11:34 +02:00
Aevann1 05b7e79b76 remove the code i added for rdrama.com 2022-11-11 15:52:18 +02:00
justcool393 26549a6e66
remove logged out routes (#433)
* remove /logged_out/ routes

* update sitemap, remove users route, and update header

* cloudflare cookie

* only mess with the cookie whenever we desire auth

* sitemap: (small) improvements
sitemap: fix little bug i introduced
sitemap: fix login redirects for /id/ routes

* sitemap: remove duplicate entry

* contact is auth desired

* imports: don't import what we don't need and bind late to the db

* praying to god this works

* keep yourself safe

* oh i actually need to commit and push lol

* import Sub

* t

* refix cache purger
2022-11-09 00:35:24 -05:00
Aevann1 c76bfa5ffc fix 3 permapin limit not working 2022-11-08 11:41:16 +02:00
Aevann1 3f4a568d32 fix permachudding 2022-11-08 05:37:18 +02: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 50bcc81f14 give user an error when they give invalid page input 2022-11-07 23:34:43 +02:00
justcool393 0fffa7efc0 rename truecoins to truescore 2022-11-06 23:04:34 -08:00
Aevann1 3b49535c4a make 3 more buttons instant 2022-11-07 08:26:41 +02:00
Aevann1 ce6998bd6e make shadowbanned, banning, chudding from the userpage work without refreshing the page 2022-11-07 08:08:53 +02:00
Aevann1 07f4383d4c unmarked as chud -> unchudded 2022-11-07 07:44:09 +02:00
Aevann1 99a44f461c fix chud badge not being given 2022-11-07 07:43:25 +02:00
Aevann1 a664d19c37 rename 2 modlog actions 2022-11-07 03:47:27 +02:00
Aevann1 bbfb18da9a change clearing cache terminology 2022-11-06 07:28:47 +02:00
Aevann1 c1937a67c4 fix 0.0001 days being displayed as "0 days" 2022-11-05 05:06:33 +02:00
Aevann1 299dbceeeb only add reason if there's a reason 2022-11-05 04:48:04 +02:00
Aevann1 f924f88821 make "unshadowban" button work instantly 2022-11-05 04:16:43 +02:00
Aevann1 87d5a0de46 improve ban modal and add chud modal 2022-11-05 04:12:22 +02:00
Aevann1 ab9c0288fb make "unban user" button in userpage work instantly 2022-11-05 04:12:22 +02:00
Aevann1 5ef2b41d5e change chud theme terminology 2022-11-05 04:12:21 +02:00
Aevann1 07a12380de accomodate alt domain 2022-11-03 17:29:14 +02:00
justcool393 4a252e9699 security: fix CSRF on internal cache dump route
move dumping internal cache to admin tools
2022-11-02 20:35:46 -05:00
justcool393 09f76d917d permissions: check if user can dump internal cache before attempting to do it 2022-11-02 20:22:22 -05:00
Aevann1 f73c6d46df accomodate rdrama.com users 2022-11-02 08:31:04 +02:00
Aevann1 111c9ab208 fix this https://rdrama.life/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/3007141?context=8#context 2022-11-02 05:22:16 +02:00
justcool393 6caebac946 actions: move user-only actions to useractions, which gets rid of a circular dependency 2022-11-01 18:46:56 -05:00
justcool393 7d80483f67 alts: only change session data if new include_current_session flag is set 2022-11-01 16:58:42 -05:00
justcool393 2fed50cb46 not post.stickied_utc 2022-11-01 15:19:35 -05:00