dakkar
074de82bf7
some validation fixes
2024-03-30 11:05:58 +00:00
tamaina
9a70ce8f5e
Merge pull request from GHSA-qqrm-9grj-6v32
...
* maybe ok
* fix
* test wip
* ✌️
* fix
* if (res.ok)
* validateContentTypeSetAsJsonLD
* 条件を考慮し直す
* その他の+json接尾辞が付いているメディアタイプも受け容れる
* https://github.com/misskey-dev/misskey-ghsa-qqrm-9grj-6v32/pull/1#discussion_r1490999009
* add `; profile="https://www.w3.org/ns/activitystreams "`
* application/ld+json;
2024-02-17 12:41:19 +09:00
tamaina
c1514ce91d
(re) update SPDX-FileCopyrightText
...
Fix #13290
2024-02-13 15:59:27 +00:00
tamaina
311c2172d7
Revert "update SPDX-FileCopyrightText"
...
This reverts commit 9b5aeb76d8
.
2024-02-13 15:50:11 +00:00
syuilo
9b5aeb76d8
update SPDX-FileCopyrightText
2024-02-12 11:37:45 +09:00
MeiMei
d415fd29a3
enhance(backend): ActivityPub Deliver queueでBodyを事前処理するように ( #12916 )
...
* Pre-processing deliver body
* CHANGELOG
* ループ内で計算されると意味がないので
* 同じ処理を同じ形に
---------
Co-authored-by: まっちゃとーにゅ <17376330+u1-liquid@users.noreply.github.com>
2024-01-06 09:07:48 +09:00
syuilo
053da10e94
refactor(backend): update directory structure for models
2023-09-20 11:33:36 +09:00
syuilo
792622aead
refactor: prefix Mi for all entities ( #11719 )
...
* wip
* wip
* wip
* wip
* Update RepositoryModule.ts
* wip
* wip
* wip
* Revert "wip"
This reverts commit c1c13b37d2aaf3c65bc148212da302b0eb7868bf.
2023-08-16 17:51:28 +09:00
Shun Sakai
c2370a1be6
chore: 著作権とライセンスについての情報を各ファイルに追加する ( #11348 )
...
* chore: Add the SPDX information to each file
Add copyright and licensing information as defined in version 3.0 of
the REUSE Specification.
* tweak format
---------
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2023-07-27 14:31:52 +09:00
okayurisotto
e35a370af0
refactor(backend): core/activitypub
( #11247 )
...
* eslint: `explicit-function-return-type`
* eslint: `no-unnecessary-condition`
* eslint: `eslint-disable-next-line`
* eslint: `no-unused-vars`
* eslint: `comma-dangle`
* eslint: `import/order`
* cleanup: unnecessary non-null assertion
* cleanup: `IActivity`に`actor`は常に存在するようなので
* cleanup: unnecessary `as`
* cleanup: unnecessary `Promise.resolve`
* cleanup
* refactor: `String.prototype.match()`である必要がない部分をよりシンプルな書き方に変更
* refactor: よりよい型定義
* refactor: よりよい型定義
- `LdSignature`の`normalize`メソッドでの使われ方から、
- `data`引数の型定義を`any`から`JsonLdDocument`へ修正
- `getLoader`メソッドの返り値の型定義の一部を`any`から`RemoteDocument`へ修正
- `contextUrl`が不正な値(`null`)となっていたことが判明したため`undefined`へ修正
- `document`の型と合わせるために`CONTEXTS`の型定義の一部を`unknown`から`JsonLd`へ修正
- とりあえず`satisfies`を使用
- `document`の型と合わせるために`fetchDocument`メソッドの返り値の型定義の一部を`unknown`から`JsonLd`へ修正
- どうしようもなく`as`を使用
* refactor: 型ガードを使うことでnon-null assertionをやめた
* refactor: non-null assertionをやめた
`.filter()`で行っている型ガードなどの文脈から、より適しているだろうと思われる書き方に変更した。
* refactor: 型ガードを使うことで`as`をやめた
* refactor: `as`をやめた
* refactor: よりよい型定義
- `id`は`null`とのunionになっていたが、`null`を渡している場面はなかった
- またおそらくこのメソッドは`IOrderedCollection`を返すため、そちらに合わせて`null`とのunionをやめた
- `IOrderedCollection`とはまだ型に相違がある
- `totalItems`をコメントや使われ方を元に`number`へ推論
* refactor: `for-of` -> `Array.prototype.map`
* refactor: `delete`演算子を使わない形に
2023-07-13 12:48:34 +09:00
syuilo
28647de196
enhance(backend): improve userkeypair cache
2023-04-05 12:10:40 +09:00
Kagami Sascha Rosylight
d1d3b48e51
test(backend): restore ap-request tests ( #9997 )
...
Co-authored-by: tamaina <tamaina@hotmail.co.jp>
2023-02-24 16:10:48 +09:00
syuilo
945c50db1f
Update ApRequestService.ts
2023-01-25 12:31:03 +09:00
syuilo
d4fb201d05
fix(server): node-fetchおよびgotを使う以前の実装に戻す
...
see #9710
2023-01-25 12:00:04 +09:00
tamaina
6589e8a390
Fix #9710 ? ( #9712 )
...
* wip
* update pnpm-lock
* use our own DevNull
* fix
* deliverJobConcurrencyをmacSocketsで割ってソケット数にする
2023-01-24 15:54:14 +09:00
syuilo
869854eae7
コミット漏れ
2023-01-24 08:32:17 +09:00
Mary
3feaf39294
ApRequestService: don't generate our own Host header ( #9378 )
2023-01-17 02:21:15 +09:00
tamaina
978a9bbb3b
perf(backend): Use undici instead of node-fetch and got ( #9459 )
...
* Implement? HttpFetchService
* ✌️
* remove node-fetch
* fix
* refactor
* fix
* gateway timeout
* UndiciFetcherクラスを追加 (仮コミット, ビルドもstartもさせていない)
* fix
* add logger and fix url preview
* fix ip check
* enhance logger and error handling
* fix
* fix
* clean up
* Use custom fetcher for ApRequest / ApResolver
* bypassProxyはproxyBypassHostsに判断を委譲するように
* set maxRedirections (default 3, ApRequest/ApResolver: 0)
* fix comment
* handle error s3 upload
* add debug message
* no return await
* Revert "no return await"
This reverts commit b5b0dc58a342393d260492e3a6f58304372f53b2.
* reduce maxSockets
* apResolverのUndiciFetcherを廃止しapRequestのものを使う、 add ap logger
* Revert "apResolverのUndiciFetcherを廃止しapRequestのものを使う、 add ap logger"
This reverts commit 997243915c8e1f8472da64f607f88c36cb1d5cb4.
* add logger
* fix
* change logger name
* safe
* デフォルトでUser-Agentを設定
2023-01-12 21:03:02 +09:00
syuilo
bbb49457f9
refactor: introduce bindThis decorator to bind this automaticaly
2022-12-04 15:03:09 +09:00
syuilo
22ccb0fa71
refactor
2022-12-04 10:16:03 +09:00