dullbananas
45818fb4c5
Reduce memory usage of rate limiting ( #3111 )
...
* Reduce Vec allocations
* Optimize stuff
* Move embedded migrations to separate crate
* Revert "Move embedded migrations to separate crate"
This reverts commit 44b1049970
.
* clippy, fmt
* Shrink rate limit allowance to f32
* Initialize rate limit allowance directly
* Add removal of old rate limit buckets
* Improve readability
* Remove usage of is_okay_and for Rust 1.67 compatibility
* Add dhat-heap feature
* Fix api_benchmark.sh and add run_and_benchmark.sh
* Revert "Fix api_benchmark.sh and add run_and_benchmark.sh"
This reverts commit b4528e5b85
.
* Revert "Add dhat-heap feature"
This reverts commit 08e835d487
.
* Manually revert remaining stuff
* Use Ipv6Addr in RateLimitStorage
* Shrink last_checked in RateLimitBucket to 32 bits
* Fix rate_limit::get_ip
* Stuff (#1 )
* Update rate_limiter.rs
* Update mod.rs
* Update scheduled_tasks.rs
* Fix rate_limiter.rs
* Dullbananas patch 1 (#2 )
* Update rate_limiter.rs
* Update mod.rs
* Update scheduled_tasks.rs
* Fix rate_limiter.rs
* Rate limit IPv6 addresses in groups
* Fmt lib.rs
* woodpicker trigger
* Refactor and comment `check_rate_limit_full`
* Add `test_split_ipv6`
* Replace -2.0 with UNINITIALIZED_TOKEN_AMOUNT
* Add `test_rate_limiter`
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-06-21 10:28:20 +02:00
Dessalines
36aaa50644
Organize utils into separate files. Fixes #2295 ( #2736 )
...
* Organize utils into separate files. Fixes #2295
* Moving tests.
* Fix test.
* Fix test 2
2023-02-16 05:05:14 +01:00
Nutomic
24756af84b
Live reload settings ( fixes #2508 ) ( #2543 )
...
* Live reload rate limit settings (fixes #2508 )
* fix tests
2022-11-16 14:06:22 -05:00
Nutomic
9393195827
Send error message when rate limit is reached ( #2527 )
...
* Send error message when rate limit is reached
* l18n key
2022-11-03 18:13:40 +00:00
Dessalines
235cc8b228
Moving settings to Database. ( #2492 )
...
* Moving settings to Database.
- Moves many settings into the database. Fixes #2285
- Adds a local_site and instance table. Fixes #2365 . Fixes #2368
- Separates SQL update an insert forms, to avoid runtime errors.
- Adds TypedBuilder to all the SQL forms, instead of default.
* Fix weird clippy issue.
* Removing extra lines.
* Some fixes from suggestions.
* Fixing apub tests.
* Using instance creation helper function.
* Move forms to their own line.
* Trying to fix local_site_data, still broken.
* Fixing federation tests.
* Trying to fix check features 1.
* Addressing PR comments.
* Adding check_apub to all verify functions.
2022-10-27 09:24:07 +00:00
Luna
e33736ae47
remove parking_lot ( #2350 )
2022-07-11 17:12:12 +00:00
Dessalines
e16821116e
Lowering search rate limit. Fixes #2153 ( #2154 )
...
* Lowering search rate limit. Fixes #2153
* Adding a search rate limit.
* Forgot to add the websocket search rate limit
* Fix wrong op
2022-03-29 15:46:03 +00:00
Dessalines
f2a0841586
Rate limit websocket joins. ( #2165 )
...
* Rate limit websocket joins.
* Removing async on mutex lock fn.
* Removing redundant ip
* Return early if check fails.
2022-03-27 00:29:05 +00:00
Nutomic
a5ff629b24
Dont log errors when rate limit is hit ( fixes #2157 ) ( #2161 )
...
* Dont log errors when rate limit is hit (fixes #2157 )
* Clone service rather than http request
* some cleanup/refactoring
Co-authored-by: Aode (Lion) <asonix@asonix.dog>
2022-03-25 16:41:38 +01:00
Dessalines
2da0684e95
Removing check_only
2022-03-24 16:29:08 -04:00
Dessalines
ed9f70276d
Fix rate limit check for register. Fixes #2159
2022-03-24 16:13:58 -04:00
layla
7fe7062c47
Implement rate limits on comments
2021-11-18 13:40:16 +00:00
Dessalines
8708ad1b44
Moving settings and secrets to context.
2021-09-27 11:25:26 +02:00
Dessalines
73449c09a7
Fix image uploads. Fixes #1725 ( #1734 )
...
* Fix image uploads. Fixes #1725
* Adding comment on awc dep.
2021-08-25 16:33:45 +00:00
Dessalines
7b8cbbba85
Simplify config using macros ( #1686 )
...
Co-authored-by: Felix Ableitner <me@nutomic.com>
2021-08-04 21:13:51 +00:00
Dessalines
9840f5c1c1
Upgrading deps, running clippy fix on nightly 1.55.0 ( #1638 )
...
* Upgrading deps, running clippy fix on nightly 1.55.0
* Running clippy --fix
* Trying to fix transform
* Trying to fix another transform
* Upgrading http-signature-normalization-actix
* Fix app_data
* Fix pictrs uploading
* Fix unwrap
2021-07-06 13:26:46 +00:00
Dessalines
c3efb9f7cf
Strictly typing DB id fields. Fixes #1498
2021-03-18 16:25:21 -04:00
Dessalines
462c4a2954
Rewrite settings implementation. Fixes #1270 ( #1433 )
...
* A first attempt at using deser-hjson. Fixes #1270
* Trying to fix tests, try 1
* Trying to fix tests, try 2
* A few fixes to deser_hjson
- Removing unwrap_or_defaults, using impl functions.
- Reorganized settings
* Make clippy happy
* hjson list strings must be quoted.
* Adding support for env vars.
* Moving to structs and defaults file.
* Moving settings default and struct.
2021-03-01 17:24:11 +00:00
Felix Ableitner
3b64c58198
Move most code into crates/ subfolder
2021-01-20 16:21:27 +01:00