Open dahlia opened 3 months ago
Attention: Patch coverage is 50.00000%
with 7 lines
in your changes missing coverage. Please review.
Project coverage is 40.69%. Comparing base (
43cccaa
) to head (a143a5c
). Report is 186 commits behind head on develop.
Files | Patch % | Lines |
---|---|---|
...end/src/core/activitypub/models/ApPersonService.ts | 50.00% | 7 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
may related to: https://github.com/misskey-dev/misskey/pull/13464 (複数の鍵を実際に持とうとしているPRがあります)
理論上(In theory)、アクターのpublicKeyは複数の公開鍵を含む配列にすることができます。Mastodonもこのケースを処理しています。
配列でもただのオブジェクトでもいいのはActivityStreamsの仕様?
配列でもただのオブジェクトでもいいのはActivityStreamsの仕様?
JSON LDの仕様だった
@tamaina https://github.com/misskey-dev/misskey/commit/64004fdea244f039c34e9f59a103be9b9e164f77のコミットでパッチが既に適用されているようですが、このPRはもう閉じてもいいのでしょうか?
@dahlia 64004fd は#13464 のコミットので… 私には判断できないですね
それでは、https://github.com/misskey-dev/misskey/pull/13464のPRがマージされたら、このPRも閉じます。
最終的に複数の公開鍵の受け入れに本格対応するにしても、先行して本PRのような保守的な変更で前方互換性を担保しておいた方が何かと役立ちうるのではないかと考えます。(実際に本PRの変更に依存した仕様を採用するかはさておいても、設計上の選択肢は多いに越したことはないので。)
コメントを受けて一応reopen(もし再度ed25519のほう #14278 が入るならまたクローズすることになりそう)
What
一人のリモートユーザーが複数の公開鍵を持つコーナーケースを処理します.
This patch handles the corner case where a remote user has multiple public keys.
Why
理論上、アクターの
publicKey
は複数の公開鍵を含む配列にすることができます。Mastodonもこのケースを処理しています。In theory, an actor's
publicKey
could be an array containing multiple public keys. Mastodon also already handles this case.Additional info (optional)
現在は
MiUserPublicKey
の主キーがuserId
なので、一人のユーザが複数の公開鍵を持っている場合、最初の鍵だけを保存するように実装しました。将来的にはMiUserPublicKey
の主キーを(userId, keyId)
に変える方が良いかもしれません。For now, the primary key of
MiUserPublicKey
is userId, so my implementation only stores the first key if a user has multiple public keys. In the future, it might be better to change the primary key ofMiUserPublicKey
to(userId, keyId)
.Checklist