Commit Graph

102 Commits (f6b6997f6136d7b700acb7394771c1ef889ecaa7)

Author SHA1 Message Date
Snakes f6b6997f61 Persist activity timestamp to users. 2022-06-20 16:25:03 -04:00
Aevann1 f60db1598d replace "g.db.query" on pkeys with the much more efficient "g.db.get" 2022-06-18 02:57:23 +02:00
Aevann1 4a98c2a639 don't whitelist fagmins 2022-06-07 12:34:46 +02:00
Snakes 5d56e71cc9 Rate limiter: fix 81e2a5a for logged-out. 2022-05-30 23:50:56 -04:00
Snakes 4ba2098612 Rate limiter: whitelist admins.
Due to presently hitting perpetual 429s after a mishap with lottery
polling on production, among past events where admins have gotten
rate-limited for doing otherwise normal admin behavior, the
flask_limiter.Limiter now has a request filter to whitelist JL2+.
Despite running on every request, I don't anticipate this undermining
the DoS prevention power of the Limiter.

It is yet unknown whether there are edge cases where running
get_logged_in_user in a different spot in the request pipeline might
e.g. subtly break the logged-in counters. This is not expected at
present, however.
2022-05-30 23:01:18 -04:00
Snakes 81e19b1aed Add can_gamble user setting.
Users now have a toggleable can_gamble setting which disables their
ability to use all chance-based gains on the site: viz. slots,
blackjack, the lottery, and treasure chests.

This only applies on invocation of commands that start gambling
games, so it should cause no bugs when toggled with e.g. active
blackjack games.

This was added for the benefit of users with actual problems with
gambling, be they past addiction or religious conviction. All future
gambling features are humbly requested to respect it.
2022-05-30 05:32:45 -04:00
Outrun Colors, LLC b9dc28e6d1 Don't show lotteries on the sister sites 2022-05-29 20:43:16 -05:00
Aevann1 3f04c69cb8 fds 2022-05-28 01:50:33 +02:00
Aevann1 758a30e166 fsd 2022-05-26 22:53:24 +02:00
Aevann1 d4f7f5497b fds 2022-05-26 22:49:36 +02:00
Aevann1 630996faee gfd 2022-05-26 22:31:08 +02:00
Aevann1 e4893c617e fd 2022-05-26 02:54:05 +02:00
Aevann1 50b995d3a0 fds 2022-05-25 22:16:26 +02:00
Aevann1 49c53cb2ff fds 2022-05-25 20:59:24 +02:00
Aevann1 162bf9dad7 no more g.timestamp y'all couldn't behave 2022-05-25 17:42:04 +02:00
Snakes 67796acc11 Fix chat by setting g.timestamp.
The users online count recently added to wrappers.py:get_logged_in_user
uses g.timestamp for its calculations. This is primarily set in
__main__.py:before_request. However, chat has requests which do not
trigger @app.before_request. To resolve this, we now set g.timestamp
in the auth_required wrapper before calling get_logged_in_user().

I think this is safe in general; there's no particular harm to setting
the timestamp _more_ frequently.
2022-05-25 06:49:02 -04:00
Aevann1 e1f298deb8 sfd 2022-05-24 22:27:27 +02:00
Aevann1 2b9dcb0c6a users here now 2022-05-24 22:19:18 +02:00
Aevann1 028563ad7d bgd 2022-05-07 08:04:14 +02:00
Aevann1 6b10d097a2 mn 2022-05-05 01:09:46 +02:00
Aevann1 94e6eb1ef6 sdf 2022-05-02 00:28:51 +02:00
Aevann1 a4b0565b5a sfd 2022-05-01 23:48:53 +02:00
Aevann1 6b97488355 fds 2022-04-22 17:08:42 +02:00
Aevann1 e547ad90cc fds 2022-04-16 17:04:34 +02:00
Aevann1 5a6ac9d8b2 fsd 2022-04-12 22:45:07 +02:00
Aevann1 579e81de2a site settings 2022-04-12 21:05:50 +02:00
Aevann1 bf391394a8 bad PR 2022-03-05 22:53:39 +02:00
Aevann1 b0d6490d1f vc 2022-02-14 01:07:13 +02:00
Aevann1 35aeb816d7 mn 2022-02-13 13:02:44 +02:00
Aevann1 819c2846f9 fsd 2022-02-04 06:21:47 +02:00
Aevann1 e04a8ee5f3 fsd\ 2022-02-03 09:00:43 +02:00
Aevann1 27766290a9 vxc 2022-02-03 08:39:02 +02:00
Aevann1 b1c443a301 fds 2022-01-19 11:27:51 +02:00
Aevann1 0e5218b2dc bbbb 2022-01-11 21:46:50 +02:00
Aevann1 b446532ad2 bb 2022-01-09 23:06:21 +02:00
Aevann1 b69199054c under attack 2022-01-09 17:15:02 +02:00
Aevann1 b1e9e03016 fsd 2022-01-07 22:48:49 +02:00
Aevann1 2c7a98e433 big one 2022-01-06 18:46:09 +02:00
Aevann1 3f7e92e650 sfd 2021-12-24 05:15:43 +02:00
Aevann1 91e8b1c0c2 fd 2021-12-24 05:08:07 +02:00
Aevann1 ce44366947 fds 2021-12-24 05:07:04 +02:00
Aevann1 4a0f2177fe dfs 2021-12-24 05:05:29 +02:00
Aevann1 4e98eb888e fsd 2021-12-24 05:03:26 +02:00
Aevann1 f9b4bdeeca fsdsfd 2021-12-23 20:31:29 +02:00
Aevann1 cb7e1a5518 fds 2021-12-23 20:18:25 +02:00
Aevann1 9bb18f1c83 sfddfs 2021-12-22 00:28:29 +02:00
Aevann1 25c569cc36 dsfsfd 2021-12-21 22:39:43 +02:00
Aevann1 3ee2c0749f dsfsdf 2021-12-21 22:03:13 +02:00
Aevann1 c6474d1870 sfdsdf 2021-12-21 09:57:43 +02:00
Aevann1 4135175d8a fdssfd 2021-12-20 22:03:59 +02:00