Commit Graph

1158 Commits (96f4f8499fa72f0eaabb0bcbb62145ef5aa37e36)

Author SHA1 Message Date
Aevann1 96f4f8499f fix 500 errors 2022-10-06 09:30:38 +02:00
justcool393 2a66104d8b improve body for edit_post 2022-10-05 16:35:44 -07:00
justcool393 d58351637c use constants 2022-10-05 16:35:44 -07:00
justcool393 093ced7b20 introduce constant for post and title length 2022-10-05 16:35:44 -07:00
justcool393 2a53df20ff consistency in return error and returned status code 2022-10-05 16:35:44 -07:00
justcool393 88ae00deef sanitize raw bodies 2022-10-05 16:35:44 -07:00
justcool393 19b2f71c3b improve raw title sanitization and don't check the same thing like 5 times 2022-10-05 16:35:44 -07:00
Aevann1 2f979b859b generate modlogs when a hole janny toggles nsfw 2022-10-06 01:24:54 +02:00
justcool393 9575e11b8b add get_sub_by_name function 2022-10-05 03:37:29 -07:00
justcool393 d5bd3463e8
disallow permanently banned users from untoggling NSFW
can help i guess prevent abuse and creating a situation where dueling NSFW toggles have to be set
2022-10-04 14:09:25 -07:00
Aevann1 fabbc7a1a3 allow hole jannies to mark posts and comments in their holes as +18 2022-10-04 22:10:59 +02:00
Aevann1 3bf62c6ff0 add missing ban_reason when shadowbanning 2022-10-02 13:31:02 +02:00
Aevann1 da4ade067d make pizza's vote on himself be the first 2022-10-02 12:35:04 +02:00
justcool393 057bc360bf don't duplicate get checks for posts 2022-09-30 15:51:17 -07:00
justcool393 c1ca1a02ac
only attempt to parse HTML content types for titles (#382)
* only attempt to parse HTML content types for titles

also don't try to get submission titles for .gifv, .tif, .tiff

* ratelimit to 3 per minute instead of 6 minutes

no one will ever need more than 3 requests to this endpoint per minute - justcool393

6 per minute is already kinda a lot for this endpoint, i think aggressively ratelimiting this one is fine, especially since it's a minute ratelimit
2022-09-30 14:13:06 +02:00
justcool393 0617bb154c
use get_post to handle getting a post (#381)
why did we ever catch an exception throw it away, then catch an exception (something get_post already does) and then finally get the post
2022-09-30 01:44:32 -04:00
Aevann1 6b0c734254 Revert "make the default for notify True"
This reverts commit c192019a22.
2022-09-29 20:05:35 +02:00
Aevann1 c192019a22 make the default for notify True 2022-09-29 19:58:19 +02:00
Aevann1 c16654c4c7 make sure u dont try to get the title of a file (always times out) 2022-09-29 16:45:59 +02:00
Aevann1 09cc43060d
add hole mod logs (#380) 2022-09-29 11:39:37 +02:00
Aevann1 37e1f25624 make using proxies only happen in 3 circumstances again 2022-09-26 06:01:25 +02:00
Aevann1 dd0f8fbed7 proxy all requests we make 2022-09-25 05:23:50 +02:00
Aevann1 c12f7a5f9a commit before rendering 2022-09-22 22:20:29 +02:00
Aevann1 7d39cdb520 minor auth_desired refactor 2022-09-20 02:51:01 +02:00
Aevann1 ff7a54e842 Revert "test ratelimiting on devrama"
This reverts commit 1d83412545.
2022-09-19 21:43:47 +02:00
Aevann1 1d83412545 test ratelimiting on devrama 2022-09-19 21:35:58 +02:00
Aevann1 f54791cc4c remove categories 2022-09-19 20:04:30 +02:00
Aevann1 2fb4ebdcb0 minor sanitize refactor 2022-09-16 18:30:34 +02:00
Aevann1 4abf75edc0 add error codes 2022-09-12 11:52:07 +02:00
Aevann1 ae90eb1cf2 simplify house checking logic 2022-09-11 03:53:16 +02:00
Aevann1 c1aae95d16 restore "notify followers" checkbox 2022-09-10 09:00:45 +02:00
Aevann1 0f232b264c refactor torture_ap 2022-09-05 22:05:04 +02:00
Aevann1 6727d4005c better stripping syntax 2022-09-05 03:44:38 +02:00
Aevann1 842300ac6e remove code irrelevant now (not broken this time I hope) 2022-09-05 01:21:48 +02:00
Aevann1 0c32d56cd6 casino + style shit 2022-09-05 01:15:37 +02:00
outruncolors 5e1d98a3bf
WIP: Add Casino (Do Not Merge) (#341)
* Add new /casino route and template

* Consolidate lottery into casino and add initial template for slots

* Change /lottery route to /casino and replace icon with usd symbol and change sitewide const to reflect change

* Hook up new slots method to casino

* Enable Marseybux spending in casino slots

* Add UI for playing blackjack in casino

* First connection of blackjack UI to backend

* Add protective clause thanks to help from carpathianflorist.

* Create new Casino_Game relation and persist inside of blackjack

* Connect new slots behavior to Casino_Game table

* Create UI action management logic

* Add blackjack game status checker which adds persistence for blackjack

* Gonna handle this better, hold on

* Reorganize blackjack helper methods

* Reorganize casino.js to account for new changes

* Connect up to frontend

* Little changes ya know

* Display a message when winning in Blackjack

* Fix some issues with double down and insure

* Revert "remove owoify-py from requirements"

This reverts commit 4454648ea2.

* A little casino styling change

* Reorganize into a casino block

* Smallenize the card'

* Remove references to old game data on comments

* Add sql migration file

* Remove logic to drop old columns

* Fix two forgotten conflicts
2022-09-04 22:53:34 +02:00
Aevann1 8ed450e980 fix edge case with pinning child comments 2022-09-02 06:13:40 +02:00
Aevann1 5032a9aec2 fix pinned child comments 2022-09-02 02:46:17 +02:00
Aevann1 083371f20f keep_blank_values 2022-09-01 22:46:57 +02:00
Aevann1 17fd089870 refactor pinning child comments 2022-09-01 22:31:08 +02:00
Aevann1 e4c0f1b4b3 restore pizza autoupvotes on posts 2022-09-01 22:07:08 +02:00
Aevann1 8e74171d9d exclude authorized bots from hole restrictions 2022-09-01 22:01:03 +02:00
Snakes 0e70879598
Fix /h/<sub>/submit header icon.
sub.marsey_url was returning false because the submit.html template,
which then includes header.html, was passed an SQLAlchemy Row instance,
not a files.classes.sub.Sub instance. This worked alright because both
the header and the submit page only accessed the name field; however,
accessing the marsey_url property (rather than the marseyurl column
field) failed because of it.
2022-08-30 19:20:27 -04:00
Aevann1 bcec360f30 sort posts with "megathread" in title by new cuz ppl forget to tick the "new" checkbox 2022-08-30 20:22:15 +02:00
Snakes 8c50047f20
Remove new sort on 'thread' in Submission.title.
Requested by multiple jannies. Rough timeline, as I understand it:
  - Circa 7mo ago, this logic was originally added for threads with
    'megathread' in the title.
  - Some time later, a checkbox on submission which sets the flag
    Submission.new does the same thing.
  - In af680d8a94, change the check from 'megathread' to 'thread'.

There must've been some reason for the change of substring checked.
However, it routinely causes issues for the admins and confuses
users. Solution has been to retroactively update posts that currently
rely on the 'megathread' in title behavior to use the `new` flag and
to remove the logic going forward.
2022-08-30 12:14:19 -04:00
Aevann1 7fbcec3b82 turns out we didnt need a dedicated ajax variable 2022-08-30 07:26:13 +02:00
Aevann1 2aaed858d2 add a #changelog channel in jannycord 2022-08-30 04:03:48 +02:00
Aevann1 7a8eef2b99 in /submit, don't get title for url if it ends with extension 2022-08-30 03:51:09 +02:00
Aevann1 f9b56bd046 fix 500 error on posting 2022-08-27 00:05:40 +02:00
Aevann1 1a47d9a916 fix 500 error that's been happening for like a year (thank you snakes and spidey) 2022-08-27 00:03:15 +02:00