1
0
Commit Graph

370 Commits

Author SHA1 Message Date
Hazelnoot 50a3e55be4 merge: Rework rate limit factors and add caching (resolves #884) (!884)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/884

Closes #884

Approved-by: dakkar <dakkar@thenautilus.net>
Approved-by: Marie <github@yuugi.dev>
2025-02-08 15:05:01 +00:00
Hazelnoot f92fb3bb8c move SkRateLimiterService to correct directory 2025-02-05 11:20:26 -05:00
Hazelnoot 09669d72e7 lookup and cache rate limit factors directly within SkRateLimiterService 2025-02-05 11:20:25 -05:00
dakkar 408e2f824a format ruby for masto api 2025-01-19 11:16:00 +00:00
dakkar 01a5300be8 handle more complex ruby from/to html - fixes #605
this is not exactly great, but it should be "good enough"

note that the new `group` function should not escape in the wild, as
we don't document it and only use it internally

I tried using `$[scale foo bar]` instead of `$[group foo bar]`, but
that would be rendered as `<i>foo bar</i>` when sent over the network
to non-misskey instances, and we don't want that
2025-01-18 12:51:38 +00:00
dakkar e2352839e4 merge: upstream changes for 2024.11 (!742)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/742

Closes #645 and #646

Approved-by: Hazelnoot <acomputerdog@gmail.com>
Approved-by: Marie <github@yuugi.dev>
2024-12-15 17:27:12 +00:00
Hazelnoot 72d18602d8 fix SkRateLimiterService tests 2024-12-11 14:07:14 -05:00
Hazelnoot 0ea9d6ec5d use atomic variant of Leaky Bucket for safe concurrent rate limits 2024-12-11 09:10:11 -05:00
Hazelnoot 407b2423af fix redis transaction implementation 2024-12-10 19:01:35 -05:00
Hazelnoot ead781900d enable rate limits for dev environment 2024-12-09 19:04:59 -05:00
Hazelnoot 9daafca155 fix rate limits under multi-node environments 2024-12-09 19:04:06 -05:00
dakkar 1837ccc618 Merge branch 'develop' into feature/2024.10 2024-12-09 09:43:55 +00:00
Hazelnoot 2946f85592 fix type errors from new rate limit definitions 2024-12-08 13:22:07 -05:00
Hazelnoot fc4599ec07 fix rate limit scaling (it's no longer inverted) 2024-12-08 12:02:58 -05:00
Hazelnoot 91c9b67cb0 bypass rate limits when factor is 0 2024-12-08 11:58:57 -05:00
Hazelnoot 2bcac80092 use fraction seconds for rate limit headers 2024-12-08 11:56:26 -05:00
Hazelnoot 7c002ce56e move all Rate Limit type defs to rate-limit-utils.ts 2024-12-08 11:33:57 -05:00
Hazelnoot 8b091f77ca check for invalid rate limit inputs 2024-12-08 09:46:49 -05:00
Hazelnoot a7a1edc92e fix NaN from extremely high rate limits 2024-12-08 09:22:38 -05:00
Hazelnoot 2781f53d6b support fractional rate limit scaling 2024-12-08 08:32:05 -05:00
Hazelnoot f6b256620b separate SkRateLimiterService from RateLimiterService and update all usages 2024-12-07 13:13:19 -05:00
Hazelnoot 32635ecc25 fix rate limit storage in redis 2024-12-07 12:15:38 -05:00
Hazelnoot ffc2737478 implement SkRateLimiterService with Leaky Bucket rate limiting 2024-12-07 10:22:49 -05:00
dakkar 74b9351572 Merge branch 'develop' into feature/2024.10 2024-12-05 09:17:55 +00:00
dakkar 51afbbaf72 handle .masto.host specially 2024-11-29 11:39:18 +00:00
dakkar 97d17c537b spaces / lint 2024-11-29 11:39:18 +00:00
dakkar 82376f312d use "userland" punycode, plus tests
thanks to CenTdemeern1 for the `import` incantation
2024-11-29 11:39:18 +00:00
dakkar fd2af6dfe6 silence linter?
it started complaining about that `true &&` all of a sudden
2024-11-29 11:39:18 +00:00
dakkar eb25238a8e Merge branch 'develop' into feature/2024.10 2024-11-28 11:17:27 +00:00
Hazelnoot 1fb1875ac3 normalize AP IDs during verification 2024-11-23 20:23:05 -05:00
dakkar bc816cb166 Merge tag '2024.11.0' into feature/2024.10 2024-11-22 12:29:04 +00:00
dakkar d069d78c21 Merge branch 'develop' into feature/2024.10 2024-11-22 10:42:58 +00:00
かっこかり 3a6c2aa835 fix(backend): fix type error(s) in security fixes (#15009)
* Fix type error in security fixes

(cherry picked from commit fa3cf6c299)

* Fix error in test function calls

(cherry picked from commit 1758f29364)

* Fix style error

(cherry picked from commit 23c4aa2571)

* Fix another style error

(cherry picked from commit 36af07abe2)

* Fix `.punyHost` misuse

(cherry picked from commit 6027b516e1)

* attempt to fix test: make yaml valid

---------

Co-authored-by: Julia Johannesen <julia@insertdomain.name>
2024-11-21 12:10:02 +09:00
Julia Johannesen 1758f29364 Fix error in test function calls 2024-11-20 20:16:43 -05:00
饺子w (Yumechi) a11b77a415 fix(backend): Webhook Test一致性 (#14863)
* fix(backend): Webhook Test一致性

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>

* UserWebhookPayload<'followed'> 修正

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>

---------

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
2024-11-12 09:51:18 +09:00
momoirodouhu a4c5ce1413 enhance(backend) : リモートユーザーの照会をオリジナルにリダイレクトするように (#12892) (#14897)
* enhance(backend) : リモートユーザーの照会をオリジナルにリダイレクトするように (#12892)

* オリジンリダイレクトのテストをtodoとして追加。

e2eテストにリモートユーザー考慮のテストがなさそうなので。

次のコマンドで動くことは確認済みです。
curl "http://localhost:3000/@foo@bar" -H "accept: application/activity+json" -L

* Acctのパースを既存のパーサーでするように修正

* lint
2024-11-09 10:54:44 +09:00
dakkar f079edaf3c Merge tag '2024.10.1' into feature/2024.10 2024-11-08 15:52:37 +00:00
Marie d786e96c2b upd: add FriendlyCaptcha as a captcha solution
FriendlyCaptcha is a german captcha solution which is GDPR compliant and has a non-commerical free license
2024-11-02 02:20:35 +01:00
Hazel K a6befca845 clarify comment about MAX_NOTE_TEXT_LENGTH in tests 2024-10-26 09:49:28 -04:00
Hazel K 560ee43dcf separate character limits for local and remote notes 2024-10-26 09:49:28 -04:00
Hazelnoot b5a1c54d65 fix lint errors in backend unit tests 2024-10-15 21:40:20 -04:00
Hazelnoot 8a34d8e9d2 Merge branch 'develop' into feature/2024.9.0
# Conflicts:
#	locales/en-US.yml
#	locales/ja-JP.yml
#	packages/backend/src/core/NoteCreateService.ts
#	packages/backend/src/core/NoteDeleteService.ts
#	packages/backend/src/core/NoteEditService.ts
#	packages/frontend-shared/js/config.ts
#	packages/frontend/src/boot/common.ts
#	packages/frontend/src/pages/following-feed.vue
#	packages/misskey-js/src/autogen/endpoint.ts
2024-10-15 18:09:11 -04:00
Marie 7647aa637a merge: Improvements and tweaks to latest note handling (resolves #744) (!688)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/688

Closes #744

Approved-by: dakkar <dakkar@thenautilus.net>
Approved-by: Marie <github@yuugi.dev>
2024-10-15 21:50:32 +00:00
Hazelnoot de9b99c937 merge: Add filter options to following feed (resolves #726) (!671)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/671

Closes #726

Approved-by: dakkar <dakkar@thenautilus.net>
Approved-by: Marie <github@yuugi.dev>
2024-10-15 21:50:26 +00:00
Hazelnoot e781be3c72 add unit tests for SkLatestNote.areEquivalent 2024-10-15 14:17:19 -04:00
Hazelnoot fa687ecb33 fix is-renote tests 2024-10-15 14:16:46 -04:00
Hazelnoot d3792ab201 fix test failures 2024-10-15 14:16:46 -04:00
Hazel K 463b9ac59d add filters for following feed 2024-10-15 14:16:46 -04:00
Hazelnoot 86a693b182 factor out tuple logic into from-tuple.ts 2024-10-15 14:03:57 -04:00
おさむのひと 33b34ad7b8 feat: 運営のアクティビティが一定期間ない場合は通知+招待制に移行した際に通知 (#14757)
* feat: 運営のアクティビティが一定期間ない場合は通知+招待制に移行した際に通知

* fix misskey-js.api.md

* Revert "feat: 運営のアクティビティが一定期間ない場合は通知+招待制に移行した際に通知"

This reverts commit 3ab953bdf87f28411a1a10bce787a23d238cda80.

* 通知をやめてユーザ単位でのお知らせ機能に変更

* テスト用実装を戻す

* Update packages/backend/src/queue/processors/CheckModeratorsActivityProcessorService.ts

Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>

* fix remove empty then

---------

Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
2024-10-13 20:32:12 +09:00