Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 2024.11.0 #235

Merged
merged 178 commits into from
Nov 22, 2024
Merged

Conversation

anatawa12
Copy link
Collaborator

What

Why

Additional info (optional)

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

github-actions bot and others added 30 commits October 9, 2024 05:17
* wip

* Update index.d.ts

* remove unnecessary codes
* fix(frontend): ユーザー登録完了時にサインインAPIを別途使用していたのを修正

* emitされるオブジェクトの型を変更したことに伴う修正

* Update Changelog
* New translations ja-jp.yml (English)

* New translations ja-jp.yml (Portuguese)

* New translations ja-jp.yml (Catalan)

* New translations ja-jp.yml (Italian)

* New translations ja-jp.yml (Russian)

* New translations ja-jp.yml (Chinese Traditional)

* New translations ja-jp.yml (Indonesian)

* New translations ja-jp.yml (French)

* New translations ja-jp.yml (Spanish)

* New translations ja-jp.yml (Arabic)

* New translations ja-jp.yml (Czech)

* New translations ja-jp.yml (German)

* New translations ja-jp.yml (Korean)

* New translations ja-jp.yml (Polish)

* New translations ja-jp.yml (Slovak)

* New translations ja-jp.yml (Ukrainian)

* New translations ja-jp.yml (Chinese Simplified)

* New translations ja-jp.yml (Vietnamese)

* New translations ja-jp.yml (Bengali)

* New translations ja-jp.yml (Thai)

* New translations ja-jp.yml (Japanese, Kansai)

* New translations ja-jp.yml (Catalan)
* refactor(frontend): prefix css variables

* `MI_UI` -> `MI`

* fix

* `stickyBottom`

* stickyTop
* fix emoji updating bug

* update changelog

* type fix

* " -> '

* conprehensiveness check

* lint

* undefined -> null
* feat(backend): 7日間運営のアクティビティがないサーバを自動的に招待制にする

* fix RoleService.

* fix

* fix

* fix

* add test and fix

* fix

* fix CHANGELOG.md

* fix test
* reduce federation log spam

* Don't record stack trace for unrecoverable errors.
* Avoid logging duplicate stace traces.

(cherry picked from commit ed05701)

* improve error summaries

(cherry picked from commit 20dd66f)

* fix lint errors

(cherry picked from commit 83869e1)

* condense job info

(cherry picked from commit 786702e)

* fix maxAttempts calculation

(cherry picked from commit b4d10aa)

* condense error info

(cherry picked from commit f62cd89)

* normalize ID logging

(cherry picked from commit d8e1e48)

* further condense error details

(cherry picked from commit d867c20)

* collapse AbortErrors

(cherry picked from commit 5171ba7)

* don't log job name unless it has one

(cherry picked from commit a5316c0)

* Update Changelog

* Record origin

---------

Co-authored-by: Hazel K <[email protected]>
* remove rootEL ref

* use css module

* use v-bind in css

* --MI prefix

* remove unused ref

---------

Co-authored-by: syuilo <[email protected]>
* wip

* 🎨

* Enhance: モデレーター以上は制限の影響を受けないように

* refactor

* better error handling

* fix

* Revert "better error handling"

This reverts commit 5670b29.

* error handling

* エラーが出ないのを修正

* translation

* Update Changelog

* status code

* ✌️

* モデレーター以上は影響ないことを明記

* 🎨

* update changelog

* spdx

* Update update.ts

* refactor

* eliminate `screen name`

* remove untracked file

---------

Co-authored-by: KanariKanaru <[email protected]>
* wip

* wip

* Update FetchInstanceMetadataService.ts

* Update FetchInstanceMetadataService.ts

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

* fix misskey-js.api.md

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

This reverts commit 3ab953b.

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

* テスト用実装を戻す

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

Co-authored-by: syuilo <[email protected]>

* fix remove empty then

---------

Co-authored-by: syuilo <[email protected]>
Sayamame-beans and others added 21 commits November 21, 2024 08:00
* fix(backend): renoteMute doesn't work for note notification

* docs(changelog): update changelog
* New translations ja-jp.yml (Catalan)

* New translations ja-jp.yml (English)

* New translations ja-jp.yml (Korean)

* New translations ja-jp.yml (Chinese Simplified)

* New translations ja-jp.yml (Chinese Traditional)

* New translations ja-jp.yml (German)
* enhance: Add a few validation fixes from Sharkey

See the original MR on the GitLab instance:
https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/484

Co-Authored-By: Dakkar <[email protected]>

* fix: primitive 2: acceptance of cross-origin alternate

Co-Authored-By: Laura Hausmann <[email protected]>

* fix: primitive 3: validation of non-final url

* fix: primitive 4: missing same-origin identifier validation of collection-wrapped activities

* fix: primitives 5 & 8: reject activities with non
string identifiers

Co-Authored-By: Laura Hausmann <[email protected]>

* fix: primitive 6: reject anonymous objects that were fetched by their id

* fix: primitives 9, 10 & 11: http signature validation
doesn't enforce required headers or specify auth header name

Co-Authored-By: Laura Hausmann <[email protected]>

* fix: primitive 14: improper validation of outbox, followers, following & shared inbox collections

* fix: code style for primitive 14

* fix: primitive 15: improper same-origin validation for
note uri and url

Co-Authored-By: Laura Hausmann <[email protected]>

* fix: primitive 16: improper same-origin validation for user uri and url

* fix: primitive 17: note same-origin identifier validation can be bypassed by wrapping the id in an array

* fix: code style for primitive 17

* fix: check attribution against actor in notes

While this isn't strictly required to fix the exploits at hand, this
mirrors the fix in `ApQuestionService` for GHSA-5h8r-gq97-xv69, as a
preemptive countermeasure.

* fix: primitive 18: `ap/get` bypasses access checks

One might argue that we could make this one actually preform access
checks against the returned activity object, but I feel like that's a
lot more work than just restricting it to administrators, since, to me
at least, it seems more like a debugging tool than anything else.

* fix: primitive 19 & 20: respect blocks and hide more

Ideally, the user property should also be hidden (as leaving it in leaks
information slightly), but given the schema of the note endpoint, I
don't think that would be possible without introducing some kind of
"ghost" user, who is attributed for posts by users who have you blocked.

* fix: primitives 21, 22, and 23: reuse resolver

This also increases the default `recursionLimit` for `Resolver`, as it
theoretically will go higher that it previously would and could possibly
fail on non-malicious collection activities.

* fix: primitives 25-33: proper local instance checks

* revert: fix: primitive 19 & 20

This reverts commit 465a9fe6591de90f78bd3d084e3c01e65dc3cf3c.

---------

Co-authored-by: Dakkar <[email protected]>
Co-authored-by: Laura Hausmann <[email protected]>
Co-authored-by: syuilo <[email protected]>
* Fix poll update spoofing

* fix: Disallow negative poll counts

---------

Co-authored-by: syuilo <[email protected]>
* fix(backend): check target IP before sending HTTP request

* fix(backend): allow accessing private IP when testing

* Apply suggestions from code review

Co-authored-by: anatawa12 <[email protected]>

* fix(backend): lint and typecheck

* fix(backend): add isLocalAddressAllowed option to getAgentByUrl and send (HttpRequestService)

* fix(backend): allow fetchSummaryFromProxy, trueMail to access local addresses

---------

Co-authored-by: anatawa12 <[email protected]>
Co-authored-by: syuilo <[email protected]>
* Fix type error in security fixes

(cherry picked from commit fa3cf6c2996741e642955c5e2fca8ad785e83205)

* Fix error in test function calls

(cherry picked from commit 1758f29364eca3cbd13dbb5c84909c93712b3b3b)

* Fix style error

(cherry picked from commit 23c4aa25714af145098baa7edd74c1d217e51c1a)

* Fix another style error

(cherry picked from commit 36af07abe28bec670aaebf9f5af5694bb582c29a)

* Fix `.punyHost` misuse

(cherry picked from commit 6027b516e1c82324d55d6e54d0e17cbd816feb42)

* attempt to fix test: make yaml valid

---------

Co-authored-by: Julia Johannesen <[email protected]>
* fix(backend): fix apResolver

* fix

* add comments

* tweak comment
* fix exception handling for Like activities

(cherry picked from commit 8f42e8434eaebe3aba5d1980c57f49dd8ad0de91)

* fix exception handling for Announce activities

(cherry picked from commit cfc3ab4b045af0674122fa49176431860176358b)

* fix exception handling for Undo activities

* Update Changelog

---------

Co-authored-by: Hazelnoot <[email protected]>
* New translations ja-jp.yml (Chinese Simplified)

* New translations ja-jp.yml (Chinese Simplified)
Copy link

github-actions bot commented Nov 22, 2024

このPRによるapi.jsonの差分

差分はこちら
--- base
+++ head
@@ -1,7 +1,7 @@
 {
   "openapi": "3.1.0",
   "info": {
-    "version": "2024.10.0-kinel.2",
+    "version": "2024.11.0",
     "title": "Misskey API"
   },
   "externalDocs": {
@@ -281,6 +281,9 @@
                         "null"
                       ]
                     },
+                    "enableTestcaptcha": {
+                      "type": "boolean"
+                    },
                     "swPublickey": {
                       "type": [
                         "string",
@@ -387,6 +390,12 @@
                         "type": "string"
                       }
                     },
+                    "prohibitedWordsForNameOfUser": {
+                      "type": "array",
+                      "items": {
+                        "type": "string"
+                      }
+                    },
                     "bannedEmailDomains": {
                       "type": "array",
                       "items": {
@@ -577,6 +586,9 @@
                     "enableChartsForFederatedInstances": {
                       "type": "boolean"
                     },
+                    "enableStatsForFederatedInstances": {
+                      "type": "boolean"
+                    },
                     "enableServerMachineStats": {
                       "type": "boolean"
                     },
@@ -782,6 +794,7 @@
                     "recaptchaSiteKey",
                     "enableTurnstile",
                     "turnstileSiteKey",
+                    "enableTestcaptcha",
                     "swPublickey",
                     "mascotImageUrl",
                     "bannerUrl",
@@ -800,6 +813,7 @@
                     "blockedHosts",
                     "sensitiveWords",
                     "prohibitedWords",
+                    "prohibitedWordsForNameOfUser",
                     "preservedUsernames",
                     "hcaptchaSecretKey",
                     "mcaptchaSecretKey",
@@ -838,6 +852,7 @@
                     "truemailAuthKey",
                     "enableChartsForRemoteUser",
                     "enableChartsForFederatedInstances",
+                    "enableStatsForFederatedInstances",
                     "enableServerMachineStats",
                     "enableIdenticonGeneration",
                     "manifestJsonOverride",
@@ -3406,7 +3421,7 @@
                       "string",
                       "null"
                     ],
-                    "minLength": 1
+                    "minLength": 0
                   },
                   "icon": {
                     "type": "string",
@@ -4247,8 +4262,57 @@
           }
         },
         "responses": {
-          "204": {
-            "description": "OK (without any results)"
+          "200": {
+            "description": "OK (with results)",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "type": "object",
+                  "properties": {
+                    "id": {
+                      "type": "string",
+                      "format": "id"
+                    },
+                    "createdAt": {
+                      "type": "string",
+                      "format": "date-time"
+                    },
+                    "updatedAt": {
+                      "type": [
+                        "string",
+                        "null"
+                      ],
+                      "format": "date-time"
+                    },
+                    "name": {
+                      "type": "string"
+                    },
+                    "description": {
+                      "type": "string"
+                    },
+                    "url": {
+                      "type": "string"
+                    },
+                    "roleIdsThatCanBeUsedThisDecoration": {
+                      "type": "array",
+                      "items": {
+                        "type": "string",
+                        "format": "id"
+                      }
+                    }
+                  },
+                  "required": [
+                    "id",
+                    "createdAt",
+                    "updatedAt",
+                    "name",
+                    "description",
+                    "url",
+                    "roleIdsThatCanBeUsedThisDecoration"
+                  ]
+                }
+              }
+            }
           },
           "400": {
             "description": "Client error",
@@ -14157,6 +14221,15 @@
                       "type": "string"
                     }
                   },
+                  "prohibitedWordsForNameOfUser": {
+                    "type": [
+                      "array",
+                      "null"
+                    ],
+                    "items": {
+                      "type": "string"
+                    }
+                  },
                   "themeColor": {
                     "type": [
                       "string",
@@ -14329,6 +14402,9 @@
                       "null"
                     ]
                   },
+                  "enableTestcaptcha": {
+                    "type": "boolean"
+                  },
                   "sensitiveMediaDetection": {
                     "type": "string",
                     "enum": [
@@ -14574,6 +14650,9 @@
                   "enableChartsForFederatedInstances": {
                     "type": "boolean"
                   },
+                  "enableStatsForFederatedInstances": {
+                    "type": "boolean"
+                  },
                   "enableServerMachineStats": {
                     "type": "boolean"
                   },
@@ -16768,7 +16847,9 @@
                       "enum": [
                         "abuseReport",
                         "abuseReportResolved",
-                        "userCreated"
+                        "userCreated",
+                        "inactiveModeratorsWarning",
+                        "inactiveModeratorsInvitationOnlyChanged"
                       ]
                     }
                   },
@@ -17096,7 +17177,9 @@
                       "enum": [
                         "abuseReport",
                         "abuseReportResolved",
-                        "userCreated"
+                        "userCreated",
+                        "inactiveModeratorsWarning",
+                        "inactiveModeratorsInvitationOnlyChanged"
                       ]
                     }
                   }
@@ -17438,7 +17521,9 @@
                       "enum": [
                         "abuseReport",
                         "abuseReportResolved",
-                        "userCreated"
+                        "userCreated",
+                        "inactiveModeratorsWarning",
+                        "inactiveModeratorsInvitationOnlyChanged"
                       ]
                     }
                   },
@@ -17618,7 +17703,9 @@
                     "enum": [
                       "abuseReport",
                       "abuseReportResolved",
-                      "userCreated"
+                      "userCreated",
+                      "inactiveModeratorsWarning",
+                      "inactiveModeratorsInvitationOnlyChanged"
                     ]
                   },
                   "override": {
@@ -38294,6 +38381,190 @@
         }
       }
     },
+    "/following/requests/sent": {
+      "post": {
+        "operationId": "following___requests___sent",
+        "summary": "following/requests/sent",
+        "description": "No description provided.\n\n**Credential required**: *Yes* / **Permission**: *read:following*",
+        "externalDocs": {
+          "description": "Source code",
+          "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/following/requests/sent.ts"
+        },
+        "tags": [
+          "following"
+        ],
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "requestBody": {
+          "required": true,
+          "content": {
+            "application/json": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "sinceId": {
+                    "type": "string",
+                    "format": "misskey:id"
+                  },
+                  "untilId": {
+                    "type": "string",
+                    "format": "misskey:id"
+                  },
+                  "limit": {
+                    "type": "integer",
+                    "minimum": 1,
+                    "maximum": 100,
+                    "default": 10
+                  }
+                }
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "OK (with results)",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "type": "array",
+                  "items": {
+                    "type": "object",
+                    "properties": {
+                      "id": {
+                        "type": "string",
+                        "format": "id"
+                      },
+                      "follower": {
+                        "type": "object",
+                        "$ref": "#/components/schemas/UserLite"
+                      },
+                      "followee": {
+                        "type": "object",
+                        "$ref": "#/components/schemas/UserLite"
+                      }
+                    },
+                    "required": [
+                      "id",
+                      "follower",
+                      "followee"
+                    ]
+                  }
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Client error",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "INVALID_PARAM": {
+                    "value": {
+                      "error": {
+                        "message": "Invalid param.",
+                        "code": "INVALID_PARAM",
+                        "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Authentication error",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "CREDENTIAL_REQUIRED": {
+                    "value": {
+                      "error": {
+                        "message": "Credential required.",
+                        "code": "CREDENTIAL_REQUIRED",
+                        "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Forbidden error",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "AUTHENTICATION_FAILED": {
+                    "value": {
+                      "error": {
+                        "message": "Authentication failed. Please ensure your token is correct.",
+                        "code": "AUTHENTICATION_FAILED",
+                        "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          },
+          "418": {
+            "description": "I'm Ai",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "I_AM_AI": {
+                    "value": {
+                      "error": {
+                        "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+                        "code": "I_AM_AI",
+                        "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          },
+          "500": {
+            "description": "Internal server error",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "INTERNAL_ERROR": {
+                    "value": {
+                      "error": {
+                        "message": "Internal error occurred. Please contact us if the error persists.",
+                        "code": "INTERNAL_ERROR",
+                        "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    },
     "/following/requests/reject": {
       "post": {
         "operationId": "following___requests___reject",
@@ -50617,6 +50888,21 @@
                   "preventAiLearning": {
                     "type": "boolean"
                   },
+                  "requireSigninToViewContents": {
+                    "type": "boolean"
+                  },
+                  "makeNotesFollowersOnlyBefore": {
+                    "type": [
+                      "integer",
+                      "null"
+                    ]
+                  },
+                  "makeNotesHiddenBefore": {
+                    "type": [
+                      "integer",
+                      "null"
+                    ]
+                  },
                   "isBot": {
                     "type": "boolean"
                   },
@@ -51441,6 +51727,16 @@
                       }
                     }
                   },
+                  "YOUR_NAME_CONTAINS_PROHIBITED_WORDS": {
+                    "value": {
+                      "error": {
+                        "message": "Your new name contains prohibited words.",
+                        "code": "YOUR_NAME_CONTAINS_PROHIBITED_WORDS",
+                        "id": "0b3f9f6a-2f4d-4b1f-9fb4-49d3a2fd7191",
+                        "httpStatusCode": 422
+                      }
+                    }
+                  },
                   "INVALID_PARAM": {
                     "value": {
                       "error": {
@@ -61028,6 +61324,15 @@
                       }
                     }
                   },
+                  "SIGNIN_REQUIRED": {
+                    "value": {
+                      "error": {
+                        "message": "Signin required.",
+                        "code": "SIGNIN_REQUIRED",
+                        "id": "8e75455b-738c-471d-9f80-62693f33372e"
+                      }
+                    }
+                  },
                   "INVALID_PARAM": {
                     "value": {
                       "error": {
@@ -72902,6 +73207,15 @@
                       }
                     }
                   },
+                  "SIGNIN_REQUIRED": {
+                    "value": {
+                      "error": {
+                        "message": "Signin required.",
+                        "code": "SIGNIN_REQUIRED",
+                        "id": "d1588a9e-4b4d-4c07-807f-16f1486577a2"
+                      }
+                    }
+                  },
                   "INVALID_PARAM": {
                     "value": {
                       "error": {
@@ -77940,6 +78254,21 @@
           "isCat": {
             "type": "boolean"
           },
+          "requireSigninToViewContents": {
+            "type": "boolean"
+          },
+          "makeNotesFollowersOnlyBefore": {
+            "type": [
+              "number",
+              "null"
+            ]
+          },
+          "makeNotesHiddenBefore": {
+            "type": [
+              "number",
+              "null"
+            ]
+          },
           "instance": {
             "type": "object",
             "properties": {
@@ -82820,6 +83149,9 @@
               "null"
             ]
           },
+          "enableTestcaptcha": {
+            "type": "boolean"
+          },
           "swPublickey": {
             "type": [
               "string",
@@ -83004,6 +83336,7 @@
           "recaptchaSiteKey",
           "enableTurnstile",
           "turnstileSiteKey",
+          "enableTestcaptcha",
           "swPublickey",
           "mascotImageUrl",
           "bannerUrl",
@@ -83158,7 +83491,9 @@
               "enum": [
                 "abuseReport",
                 "abuseReportResolved",
-                "userCreated"
+                "userCreated",
+                "inactiveModeratorsWarning",
+                "inactiveModeratorsInvitationOnlyChanged"
               ]
             }
           },

Get diff files from Workflow Page

@anatawa12 anatawa12 merged commit 508541e into niri-la:develop Nov 22, 2024
31 checks passed
@anatawa12 anatawa12 deleted the vmimi-relay-timeline/forks/nirila branch November 22, 2024 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.