From e6032a03b6145908afb45f4ff3217bfb36b0de36 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 19 Aug 2023 18:39:39 +0900 Subject: [PATCH 01/14] build(deps): bump actions/setup-node from 3.8.0 to 3.8.1 (#11739) Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.8.0 to 3.8.1. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v3.8.0...v3.8.1) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/api-misskey-js.yml | 2 +- .github/workflows/lint.yml | 6 +++--- .github/workflows/storybook.yml | 2 +- .github/workflows/test-backend.yml | 2 +- .github/workflows/test-frontend.yml | 4 ++-- .github/workflows/test-misskey-js.yml | 2 +- .github/workflows/test-production.yml | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/api-misskey-js.yml b/.github/workflows/api-misskey-js.yml index 9942708be..d0018ffcf 100644 --- a/.github/workflows/api-misskey-js.yml +++ b/.github/workflows/api-misskey-js.yml @@ -14,7 +14,7 @@ jobs: - run: corepack enable - name: Setup Node.js - uses: actions/setup-node@v3.8.0 + uses: actions/setup-node@v3.8.1 with: node-version-file: '.node-version' cache: 'pnpm' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2bdb6acd1..d3ea13c12 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,7 +19,7 @@ jobs: with: version: 8 run_install: false - - uses: actions/setup-node@v3.8.0 + - uses: actions/setup-node@v3.8.1 with: node-version-file: '.node-version' cache: 'pnpm' @@ -46,7 +46,7 @@ jobs: with: version: 7 run_install: false - - uses: actions/setup-node@v3.8.0 + - uses: actions/setup-node@v3.8.1 with: node-version-file: '.node-version' cache: 'pnpm' @@ -72,7 +72,7 @@ jobs: with: version: 7 run_install: false - - uses: actions/setup-node@v3.8.0 + - uses: actions/setup-node@v3.8.1 with: node-version-file: '.node-version' cache: 'pnpm' diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml index 9dab60cb9..b068041f3 100644 --- a/.github/workflows/storybook.yml +++ b/.github/workflows/storybook.yml @@ -38,7 +38,7 @@ jobs: version: 8 run_install: false - name: Use Node.js 20.x - uses: actions/setup-node@v3.8.0 + uses: actions/setup-node@v3.8.1 with: node-version-file: '.node-version' cache: 'pnpm' diff --git a/.github/workflows/test-backend.yml b/.github/workflows/test-backend.yml index 001ed44db..f0a152731 100644 --- a/.github/workflows/test-backend.yml +++ b/.github/workflows/test-backend.yml @@ -38,7 +38,7 @@ jobs: version: 8 run_install: false - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3.8.0 + uses: actions/setup-node@v3.8.1 with: node-version: ${{ matrix.node-version }} cache: 'pnpm' diff --git a/.github/workflows/test-frontend.yml b/.github/workflows/test-frontend.yml index 63a270334..142967903 100644 --- a/.github/workflows/test-frontend.yml +++ b/.github/workflows/test-frontend.yml @@ -25,7 +25,7 @@ jobs: version: 8 run_install: false - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3.8.0 + uses: actions/setup-node@v3.8.1 with: node-version: ${{ matrix.node-version }} cache: 'pnpm' @@ -83,7 +83,7 @@ jobs: version: 7 run_install: false - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3.8.0 + uses: actions/setup-node@v3.8.1 with: node-version: ${{ matrix.node-version }} cache: 'pnpm' diff --git a/.github/workflows/test-misskey-js.yml b/.github/workflows/test-misskey-js.yml index 899250f5c..bd9c21f5e 100644 --- a/.github/workflows/test-misskey-js.yml +++ b/.github/workflows/test-misskey-js.yml @@ -26,7 +26,7 @@ jobs: - run: corepack enable - name: Setup Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3.8.0 + uses: actions/setup-node@v3.8.1 with: node-version: ${{ matrix.node-version }} cache: 'pnpm' diff --git a/.github/workflows/test-production.yml b/.github/workflows/test-production.yml index aa4014612..5be24f83e 100644 --- a/.github/workflows/test-production.yml +++ b/.github/workflows/test-production.yml @@ -28,7 +28,7 @@ jobs: version: 8 run_install: false - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3.8.0 + uses: actions/setup-node@v3.8.1 with: node-version: ${{ matrix.node-version }} cache: 'pnpm' From c9aeccb2ab260ceedc126e6e366da8cd13ece4b2 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 20 Aug 2023 10:00:10 +0900 Subject: [PATCH 02/14] =?UTF-8?q?fix(backend):=20=E3=82=B8=E3=83=A7?= =?UTF-8?q?=E3=83=96=E3=82=AD=E3=83=A5=E3=83=BC=E7=AE=A1=E7=90=86=E7=94=BB?= =?UTF-8?q?=E9=9D=A2=E3=81=AE=E8=AA=8D=E8=A8=BC=E3=82=92=E5=9B=9E=E9=81=BF?= =?UTF-8?q?=E3=81=A7=E3=81=8D=E3=82=8B=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + packages/backend/src/server/web/ClientServerService.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d9301d74..38dcddaa9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ - ファイルアップロード時等にファイル名の拡張子を修正する関数(correctFilename)の挙動を改善 - Fix: 一部のfeatured noteを照会できない問題を修正 - Fix: muteがapiからのuser list timeline取得で機能しない問題を修正 +- Fix: ジョブキュー管理画面の認証を回避できる問題を修正 ## 13.14.2 diff --git a/packages/backend/src/server/web/ClientServerService.ts b/packages/backend/src/server/web/ClientServerService.ts index b2b443cf3..25f59914f 100644 --- a/packages/backend/src/server/web/ClientServerService.ts +++ b/packages/backend/src/server/web/ClientServerService.ts @@ -143,7 +143,9 @@ export class ClientServerService { // Authenticate fastify.addHook('onRequest', async (request, reply) => { - if (request.url === bullBoardPath || request.url.startsWith(bullBoardPath + '/')) { + // %71ueueとかでリクエストされたら困るため + const url = decodeURI(request.url); + if (url === bullBoardPath || url.startsWith(bullBoardPath + '/')) { const token = request.cookies.token; if (token == null) { reply.code(401); From 3eacbe6b6d80321d2672c02e640616395ef565ae Mon Sep 17 00:00:00 2001 From: Essem Date: Sat, 19 Aug 2023 23:20:01 -0500 Subject: [PATCH 03/14] enhance(backend): Add address bind config option (#11725) * Add address bind config option * Edit changelog * forgot to add to types --- .config/example.yml | 3 +++ CHANGELOG.md | 1 + packages/backend/src/config.ts | 1 + packages/backend/src/core/HttpRequestService.ts | 4 ++++ 4 files changed, 9 insertions(+) diff --git a/.config/example.yml b/.config/example.yml index 49683c2f3..cca44ce88 100644 --- a/.config/example.yml +++ b/.config/example.yml @@ -159,6 +159,9 @@ id: 'aid' #deliverJobMaxAttempts: 12 #inboxJobMaxAttempts: 8 +# Local address used for outgoing requests +#outgoingAddress: 127.0.0.1 + # IP address family used for outgoing request (ipv4, ipv6 or dual) #outgoingAddressFamily: ipv4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 38dcddaa9..02a0fa16d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,6 +54,7 @@ ### Server - Fix: APIのオフセットが壊れていたせいで「もっと見る」でもっと見れない問題を修正 - Fix: 外部サーバーの投稿がタイムラインに表示されないことがある問題を修正 +- Enhance: Add address bind config option (outgoingAddress) ## 13.14.1 diff --git a/packages/backend/src/config.ts b/packages/backend/src/config.ts index 29f511842..3c70e0bbe 100644 --- a/packages/backend/src/config.ts +++ b/packages/backend/src/config.ts @@ -76,6 +76,7 @@ export type Source = { id: string; + outgoingAddress?: string; outgoingAddressFamily?: 'ipv4' | 'ipv6' | 'dual'; deliverJobConcurrency?: number; diff --git a/packages/backend/src/core/HttpRequestService.ts b/packages/backend/src/core/HttpRequestService.ts index 487172dea..73bb3dc7e 100644 --- a/packages/backend/src/core/HttpRequestService.ts +++ b/packages/backend/src/core/HttpRequestService.ts @@ -53,12 +53,14 @@ export class HttpRequestService { keepAlive: true, keepAliveMsecs: 30 * 1000, lookup: cache.lookup as unknown as net.LookupFunction, + localAddress: config.outgoingAddress, }); this.https = new https.Agent({ keepAlive: true, keepAliveMsecs: 30 * 1000, lookup: cache.lookup as unknown as net.LookupFunction, + localAddress: config.outgoingAddress, }); const maxSockets = Math.max(256, config.deliverJobConcurrency ?? 128); @@ -71,6 +73,7 @@ export class HttpRequestService { maxFreeSockets: 256, scheduling: 'lifo', proxy: config.proxy, + localAddress: config.outgoingAddress, }) : this.http; @@ -82,6 +85,7 @@ export class HttpRequestService { maxFreeSockets: 256, scheduling: 'lifo', proxy: config.proxy, + localAddress: config.outgoingAddress, }) : this.https; } From 750085ffd53b7b8e9de3d9a41f88349e7264a564 Mon Sep 17 00:00:00 2001 From: atsuchan <83960488+atsu1125@users.noreply.github.com> Date: Sun, 20 Aug 2023 13:22:37 +0900 Subject: [PATCH 04/14] Fix: DB CONSTRAINT of RenoteMuting (#11724) * Fix: DB CONSTRAINT of RenoteMuting * change order of migration of fixing renotemuting --- .../migration/1665091090561-add-renote-muting.js | 4 ++++ .../migration/1690417561185-fix-renote-muting.js | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 packages/backend/migration/1690417561185-fix-renote-muting.js diff --git a/packages/backend/migration/1665091090561-add-renote-muting.js b/packages/backend/migration/1665091090561-add-renote-muting.js index 575a63703..a22d7037f 100644 --- a/packages/backend/migration/1665091090561-add-renote-muting.js +++ b/packages/backend/migration/1665091090561-add-renote-muting.js @@ -16,5 +16,9 @@ export class addRenoteMuting1665091090561 { } async down(queryRunner) { + await queryRunner.query(`DROP INDEX "IDX_renote_muting_muterId"`); + await queryRunner.query(`DROP INDEX "IDX_renote_muting_muteeId"`); + await queryRunner.query(`DROP INDEX "IDX_renote_muting_createdAt"`); + await queryRunner.query(`DROP TABLE "renote_muting"`); } } diff --git a/packages/backend/migration/1690417561185-fix-renote-muting.js b/packages/backend/migration/1690417561185-fix-renote-muting.js new file mode 100644 index 000000000..14150b036 --- /dev/null +++ b/packages/backend/migration/1690417561185-fix-renote-muting.js @@ -0,0 +1,12 @@ +export class FixRenoteMuting1690417561185 { + name = 'FixRenoteMuting1690417561185' + + async up(queryRunner) { + await queryRunner.query(`DELETE FROM "renote_muting" WHERE "muteeId" NOT IN (SELECT "id" FROM "user")`); + await queryRunner.query(`DELETE FROM "renote_muting" WHERE "muterId" NOT IN (SELECT "id" FROM "user")`); + } + + async down(queryRunner) { + + } +} From af806352a1c3701b5d8b2088dcf2154732b00152 Mon Sep 17 00:00:00 2001 From: taichan <40626578+taichanNE30@users.noreply.github.com> Date: Sun, 20 Aug 2023 13:39:37 +0900 Subject: [PATCH 05/14] =?UTF-8?q?feat:=20=E3=83=AD=E3=83=BC=E3=82=AB?= =?UTF-8?q?=E3=83=AB=E3=81=AE=E3=81=BF=E3=83=8E=E3=83=BC=E3=83=88=E6=A4=9C?= =?UTF-8?q?=E7=B4=A2=20(#11451)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add local search * Update CHANGELOG * lint * Remove TODO comment * lint * Update packages/backend/src/core/SearchService.ts --------- Co-authored-by: syuilo --- CHANGELOG.md | 2 ++ packages/backend/src/core/SearchService.ts | 14 ++++++++++- packages/frontend/src/pages/search.note.vue | 28 +++++++++++++-------- 3 files changed, 33 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02a0fa16d..2782dcf45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ - 絵文字ピッカーの検索の表示件数を100件に増加 - Enhance: ユーザーメニューでスイッチでユーザーリストに追加・削除できるように - Enhance: 自分が押したリアクションのデザインを改善 +- Enhance: ノート検索にローカルのみ検索可能なオプションの追加 - Fix: サーバー情報画面(`/instance-info/{domain}`)でブロックができないのを修正 - Fix: 未読のお知らせの「わかった」をクリック・タップしてもその場で「わかった」が消えない問題を修正 - Fix: iOSで画面を回転させるとテキストサイズが変わる問題を修正 @@ -35,6 +36,7 @@ - Fix: Misskeyプラグインをインストールする際のAiScriptバージョンのチェックが0.14.0以降に対応していない問題を修正 ### Server +- Fix: ノート検索 `notes/search` にてhostを指定した際に検索結果に反映されるように - cacheRemoteFilesの初期値はfalseになりました - ファイルアップロード時等にファイル名の拡張子を修正する関数(correctFilename)の挙動を改善 - Fix: 一部のfeatured noteを照会できない問題を修正 diff --git a/packages/backend/src/core/SearchService.ts b/packages/backend/src/core/SearchService.ts index ce80744c6..f21bd790b 100644 --- a/packages/backend/src/core/SearchService.ts +++ b/packages/backend/src/core/SearchService.ts @@ -25,6 +25,8 @@ type Q = { op: '<', k: K, v: number } | { op: '>=', k: K, v: number } | { op: '<=', k: K, v: number } | + { op: 'is null', k: K} | + { op: 'is not null', k: K} | { op: 'and', qs: Q[] } | { op: 'or', qs: Q[] } | { op: 'not', q: Q }; @@ -50,6 +52,8 @@ function compileQuery(q: Q): string { case '<=': return `(${q.k} <= ${compileValue(q.v)})`; case 'and': return q.qs.length === 0 ? '' : `(${ q.qs.map(_q => compileQuery(_q)).join(' AND ') })`; case 'or': return q.qs.length === 0 ? '' : `(${ q.qs.map(_q => compileQuery(_q)).join(' OR ') })`; + case 'is null': return `(${q.k} IS NULL)`; + case 'is not null': return `(${q.k} IS NOT NULL)`; case 'not': return `(NOT ${compileQuery(q.q)})`; default: throw new Error('unrecognized query operator'); } @@ -170,7 +174,7 @@ export class SearchService { if (opts.channelId) filter.qs.push({ op: '=', k: 'channelId', v: opts.channelId }); if (opts.host) { if (opts.host === '.') { - // TODO: Meilisearchが2023/05/07現在値がNULLかどうかのクエリが書けない + filter.qs.push({ op: 'is null', k: 'userHost' }); } else { filter.qs.push({ op: '=', k: 'userHost', v: opts.host }); } @@ -204,6 +208,14 @@ export class SearchService { .leftJoinAndSelect('reply.user', 'replyUser') .leftJoinAndSelect('renote.user', 'renoteUser'); + if (opts.host) { + if (opts.host === '.') { + query.andWhere('user.host IS NULL'); + } else { + query.andWhere('user.host = :host', { host: opts.host }); + } + } + this.queryService.generateVisibilityQuery(query, me); if (me) this.queryService.generateMutedUserQuery(query, me); if (me) this.queryService.generateBlockedUserQuery(query, me); diff --git a/packages/frontend/src/pages/search.note.vue b/packages/frontend/src/pages/search.note.vue index 799dac209..b0881fded 100644 --- a/packages/frontend/src/pages/search.note.vue +++ b/packages/frontend/src/pages/search.note.vue @@ -12,18 +12,22 @@ SPDX-License-Identifier: AGPL-3.0-only - - - +
+ {{ i18n.ts.localOnly }} -
-
@{{ user.username }}
-
- {{ i18n.ts.selectUser }} - {{ i18n.ts.remove }} + + + + +
+
@{{ user.username }}
+
+ {{ i18n.ts.selectUser }} + {{ i18n.ts.remove }} +
-
- + +
{{ i18n.ts.search }} @@ -43,6 +47,7 @@ import MkNotes from '@/components/MkNotes.vue'; import MkInput from '@/components/MkInput.vue'; import MkRadios from '@/components/MkRadios.vue'; import MkButton from '@/components/MkButton.vue'; +import MkSwitch from '@/components/MkSwitch.vue'; import { i18n } from '@/i18n'; import * as os from '@/os'; import MkFoldableSection from '@/components/MkFoldableSection.vue'; @@ -59,6 +64,7 @@ let searchQuery = $ref(''); let searchOrigin = $ref('combined'); let notePagination = $ref(); let user = $ref(null); +let isLocalOnly = $ref(false); function selectUser() { os.selectUser().then(_user => { @@ -98,6 +104,8 @@ async function search() { }, }; + if (isLocalOnly) notePagination.params.host = '.'; + key++; } From bf6158ca719b3ac23fdbe44a6579d289e979a387 Mon Sep 17 00:00:00 2001 From: Hexirp Date: Sun, 20 Aug 2023 17:54:11 +0900 Subject: [PATCH 06/14] =?UTF-8?q?fix(frontend):=20"=E3=83=A1=E3=83=83?= =?UTF-8?q?=E3=82=BB=E3=83=BC=E3=82=B8=E3=82=92=E9=80=81=E4=BF=A1"=20?= =?UTF-8?q?=E3=81=AE=E5=88=9D=E6=9C=9F=E3=83=86=E3=82=AD=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3=E3=81=99=E3=82=8B=20(#11721)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(frontend): "メッセージを送信" の初期テキストを あるサーバー A にいるとする。他のサーバー B のユーザー X へ 「メッセージを送信」しようとしたとする。その時に出てくる投稿 フォームには X へのメンションが最初から入っている。 しかし、そのメンションには B の情報が入っておらず、 A の 同名ユーザー X へのメンションとなってしまっている。 See https://github.com/misskey-dev/misskey/issues/11716 * Update CHANGELOG.md --- CHANGELOG.md | 1 + packages/frontend/src/scripts/get-user-menu.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2782dcf45..a7539e262 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ - Fix: word mute for sub note is not applied - Fix: タイムラインを下にスクロールしてノート画面に移動して再び戻ったら以前のスクロール位置を失う問題を修正 - Fix: Misskeyプラグインをインストールする際のAiScriptバージョンのチェックが0.14.0以降に対応していない問題を修正 +- Fix: 他のサーバーのユーザーへ「メッセージを送信」した時の初期テキストのメンションが間違っている問題を修正 ### Server - Fix: ノート検索 `notes/search` にてhostを指定した際に検索結果に反映されるように diff --git a/packages/frontend/src/scripts/get-user-menu.ts b/packages/frontend/src/scripts/get-user-menu.ts index b9c726e13..314358e58 100644 --- a/packages/frontend/src/scripts/get-user-menu.ts +++ b/packages/frontend/src/scripts/get-user-menu.ts @@ -156,7 +156,8 @@ export function getUserMenu(user: misskey.entities.UserDetailed, router: Router icon: 'ti ti-mail', text: i18n.ts.sendMessage, action: () => { - os.post({ specified: user, initialText: `@${user.username} ` }); + const canonical = user.host === null ? `@${user.username}` : `@${user.username}@${user.host}`; + os.post({ specified: user, initialText: `${canonical} ` }); }, }, null, { icon: 'ti ti-pencil', From 8038049068c3841844e93623baf54960627aafbe Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 21 Aug 2023 11:53:06 +0900 Subject: [PATCH 07/14] =?UTF-8?q?enhance(frontend/aiscript):=20=E7=8F=BE?= =?UTF-8?q?=E5=9C=A8=E3=81=AE=E8=A8=AD=E5=AE=9A=E8=A8=80=E8=AA=9E=E3=82=92?= =?UTF-8?q?=E5=8F=96=E5=BE=97=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolvve #11750 --- CHANGELOG.md | 1 + packages/frontend/src/scripts/aiscript/api.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7539e262..ed6c7c777 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ - Enhance: ユーザーメニューでスイッチでユーザーリストに追加・削除できるように - Enhance: 自分が押したリアクションのデザインを改善 - Enhance: ノート検索にローカルのみ検索可能なオプションの追加 +- Enhance: AiScriptで`LOCALE`として現在の設定言語を取得できるように - Fix: サーバー情報画面(`/instance-info/{domain}`)でブロックができないのを修正 - Fix: 未読のお知らせの「わかった」をクリック・タップしてもその場で「わかった」が消えない問題を修正 - Fix: iOSで画面を回転させるとテキストサイズが変わる問題を修正 diff --git a/packages/frontend/src/scripts/aiscript/api.ts b/packages/frontend/src/scripts/aiscript/api.ts index f69c63119..8dd3b665a 100644 --- a/packages/frontend/src/scripts/aiscript/api.ts +++ b/packages/frontend/src/scripts/aiscript/api.ts @@ -8,6 +8,7 @@ import * as os from '@/os'; import { $i } from '@/account'; import { miLocalStorage } from '@/local-storage'; import { customEmojis } from '@/custom-emojis'; +import { lang } from '@/config'; export function createAiScriptEnv(opts) { let apiRequests = 0; @@ -16,6 +17,7 @@ export function createAiScriptEnv(opts) { USER_NAME: $i ? values.STR($i.name) : values.NULL, USER_USERNAME: $i ? values.STR($i.username) : values.NULL, CUSTOM_EMOJIS: utils.jsToVal(customEmojis.value), + LOCALE: values.STR(lang), 'Mk:dialog': values.FN_NATIVE(async ([title, text, type]) => { await os.alert({ type: type ? type.value : 'info', From 2939e8131d303f27ef24541fa8394369401be08b Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 21 Aug 2023 12:02:52 +0900 Subject: [PATCH 08/14] 2023.9.0-beta.1 --- CHANGELOG.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed6c7c777..abe746fc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ --> -## 2023.8.0 (unreleased) +## 2023.9.0 (unreleased) ### General - OAuth 2.0のサポート diff --git a/package.json b/package.json index 283894f93..7cc040962 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "misskey", - "version": "13.14.2", + "version": "2023.9.0-beta.1", "codename": "nasubi", "repository": { "type": "git", From b60ff1f1ce04bd60d87b048ac525196a5ffebd78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?= <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Mon, 21 Aug 2023 13:01:08 +0900 Subject: [PATCH 09/14] =?UTF-8?q?fix(misskey-js):=20Play=E9=96=A2=E9=80=A3?= =?UTF-8?q?=E3=81=AE=E6=A8=A9=E9=99=90=E3=82=92=E8=BF=BD=E5=8A=A0=EF=BC=88?= =?UTF-8?q?API=E3=82=B3=E3=83=B3=E3=82=BD=E3=83=BC=E3=83=AB=E3=81=A7?= =?UTF-8?q?=E7=99=BA=E8=A1=8C=E5=8F=AF=E8=83=BD=E3=81=AB=EF=BC=89=20(#1136?= =?UTF-8?q?0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * (add) permission: flash * update changelog * Update CHANGELOG.md (カレンダーリリース対応) --------- Co-authored-by: syuilo --- CHANGELOG.md | 1 + locales/index.d.ts | 4 ++++ locales/ja-JP.yml | 4 ++++ packages/misskey-js/src/consts.ts | 4 ++++ 4 files changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index abe746fc2..63fa0e144 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ - Fix: タイムラインを下にスクロールしてノート画面に移動して再び戻ったら以前のスクロール位置を失う問題を修正 - Fix: Misskeyプラグインをインストールする際のAiScriptバージョンのチェックが0.14.0以降に対応していない問題を修正 - Fix: 他のサーバーのユーザーへ「メッセージを送信」した時の初期テキストのメンションが間違っている問題を修正 +- Playの操作を行うAPI TokenをAPIコンソールから発行できるように ### Server - Fix: ノート検索 `notes/search` にてhostを指定した際に検索結果に反映されるように diff --git a/locales/index.d.ts b/locales/index.d.ts index 4984dd18e..d7c85b959 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1862,6 +1862,10 @@ export interface Locale { "write:gallery": string; "read:gallery-likes": string; "write:gallery-likes": string; + "read:flash": string; + "write:flash": string; + "read:flash-likes": string; + "write:flash-likes": string; }; "_auth": { "shareAccessTitle": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 9089cb1d3..0dfaa4365 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1780,6 +1780,10 @@ _permissions: "write:gallery": "ギャラリーを操作する" "read:gallery-likes": "ギャラリーのいいねを見る" "write:gallery-likes": "ギャラリーのいいねを操作する" + "read:flash": "Playを見る" + "write:flash": "Playを操作する" + "read:flash-likes": "Playのいいねを見る" + "write:flash-likes": "Playのいいねを操作する" _auth: shareAccessTitle: "アプリへのアクセス許可" diff --git a/packages/misskey-js/src/consts.ts b/packages/misskey-js/src/consts.ts index 261ecd33f..2b144ab4a 100644 --- a/packages/misskey-js/src/consts.ts +++ b/packages/misskey-js/src/consts.ts @@ -39,4 +39,8 @@ export const permissions = [ 'write:gallery', 'read:gallery-likes', 'write:gallery-likes', + 'read:flash', + 'write:flash', + 'read:flash-likes', + 'write:flash-likes', ]; From 50ec129b870243bbbb76262508e4d3ec34a5d1b0 Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Mon, 21 Aug 2023 16:13:10 +0900 Subject: [PATCH 10/14] feat: 'server' webhook payload which hold misskey server url (#11752) --- CHANGELOG.md | 1 + .../src/queue/processors/WebhookDeliverProcessorService.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63fa0e144..08e059b3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,7 @@ - Fix: ノート検索 `notes/search` にてhostを指定した際に検索結果に反映されるように - cacheRemoteFilesの初期値はfalseになりました - ファイルアップロード時等にファイル名の拡張子を修正する関数(correctFilename)の挙動を改善 +- Webhookのペイロードにサーバーのurlが含まれるようになりました - Fix: 一部のfeatured noteを照会できない問題を修正 - Fix: muteがapiからのuser list timeline取得で機能しない問題を修正 - Fix: ジョブキュー管理画面の認証を回避できる問題を修正 diff --git a/packages/backend/src/queue/processors/WebhookDeliverProcessorService.ts b/packages/backend/src/queue/processors/WebhookDeliverProcessorService.ts index 169df7792..92b3720a5 100644 --- a/packages/backend/src/queue/processors/WebhookDeliverProcessorService.ts +++ b/packages/backend/src/queue/processors/WebhookDeliverProcessorService.ts @@ -47,6 +47,7 @@ export class WebhookDeliverProcessorService { 'Content-Type': 'application/json', }, body: JSON.stringify({ + server: this.config.url, hookId: job.data.webhookId, userId: job.data.userId, eventId: job.data.eventId, From 388448f29823194a7e807c63df379321dfcbd0a2 Mon Sep 17 00:00:00 2001 From: MomentQYC <62551256+MomentQYC@users.noreply.github.com> Date: Mon, 21 Aug 2023 16:21:57 +0800 Subject: [PATCH 11/14] feat: Removing stack trace info in production env (#11657) * feat: Hiding stack traces in production env * sytle * style * style * add SPDX * move ./error.js to ./misc/error.js * revert: remove frontend changes * feat: Hiding stack traces in production env * feat: Hiding stack traces in production env * revert * revert * revert * change and fix * revert * fix queue endpoint test --------- Co-authored-by: tamaina Co-authored-by: Kagami Sascha Rosylight --- .../backend/src/server/web/ClientServerService.ts | 12 ++++++------ packages/backend/test/e2e/fetch-resource.ts | 12 +++++++++++- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/packages/backend/src/server/web/ClientServerService.ts b/packages/backend/src/server/web/ClientServerService.ts index 25f59914f..56aa34363 100644 --- a/packages/backend/src/server/web/ClientServerService.ts +++ b/packages/backend/src/server/web/ClientServerService.ts @@ -148,18 +148,18 @@ export class ClientServerService { if (url === bullBoardPath || url.startsWith(bullBoardPath + '/')) { const token = request.cookies.token; if (token == null) { - reply.code(401); - throw new Error('login required'); + reply.code(401).send('Login required'); + return; } const user = await this.usersRepository.findOneBy({ token }); if (user == null) { - reply.code(403); - throw new Error('no such user'); + reply.code(403).send('No such user'); + return; } const isAdministrator = await this.roleService.isAdministrator(user); if (!isAdministrator) { - reply.code(403); - throw new Error('access denied'); + reply.code(403).send('Access denied'); + return; } } }); diff --git a/packages/backend/test/e2e/fetch-resource.ts b/packages/backend/test/e2e/fetch-resource.ts index 96683ce59..1cbfec3e5 100644 --- a/packages/backend/test/e2e/fetch-resource.ts +++ b/packages/backend/test/e2e/fetch-resource.ts @@ -34,6 +34,8 @@ describe('Webリソース', () => { let aliceGalleryPost: any; let aliceChannel: any; + let bob: misskey.entities.MeSignup; + type Request = { path: string, accept?: string, @@ -90,6 +92,8 @@ describe('Webリソース', () => { fileIds: [aliceUploadedFile.body.id], }); aliceChannel = await channel(alice, {}); + + bob = await signup({ username: 'alice' }); }, 1000 * 60 * 2); afterAll(async () => { @@ -163,9 +167,15 @@ describe('Webリソース', () => { }); describe.each([{ path: '/queue' }])('$path', ({ path }) => { + test('はログインしないとGETできない。', async () => await notOk({ + path, + status: 401, + })); + test('はadminでなければGETできない。', async () => await notOk({ path, - status: 500, // FIXME? 403ではない。 + cookie: cookie(bob), + status: 403, })); test('はadminならGETできる。', async () => await ok({ From e8ff281db050b36d12803fc71b02f71ac5e9e0c7 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 21 Aug 2023 17:22:49 +0900 Subject: [PATCH 12/14] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08e059b3b..ddfe7cdcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ - Fix: 一部のfeatured noteを照会できない問題を修正 - Fix: muteがapiからのuser list timeline取得で機能しない問題を修正 - Fix: ジョブキュー管理画面の認証を回避できる問題を修正 +- Fix: 一部のサーバー内部エラーがスタックトレースを返さないように修正 ## 13.14.2 From 49fc4cce3c778afd4c9540b0042d750fad77cfca Mon Sep 17 00:00:00 2001 From: atsuchan <83960488+atsu1125@users.noreply.github.com> Date: Mon, 21 Aug 2023 17:26:21 +0900 Subject: [PATCH 13/14] fix: Make more than 10 announcements visible on Admin (#11720) --- packages/frontend/src/pages/admin/announcements.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/frontend/src/pages/admin/announcements.vue b/packages/frontend/src/pages/admin/announcements.vue index bb903af45..a0a7b569f 100644 --- a/packages/frontend/src/pages/admin/announcements.vue +++ b/packages/frontend/src/pages/admin/announcements.vue @@ -57,6 +57,9 @@ SPDX-License-Identifier: AGPL-3.0-only
+ + {{ i18n.ts.more }} + @@ -124,6 +127,12 @@ async function save(announcement) { } } +function more() { + os.api('admin/announcements/list', { untilId: announcements.reduce((acc, announcement) => announcement.id != null ? announcement : acc).id }).then(announcementResponse => { + announcements = announcements.concat(announcementResponse); + }); +} + function refresh() { os.api('admin/announcements/list').then(announcementResponse => { announcements = announcementResponse; From f664f941a28508cbda9780cbc641eb59f2b31f13 Mon Sep 17 00:00:00 2001 From: White-Green <43771790+White-Green@users.noreply.github.com> Date: Mon, 21 Aug 2023 17:33:04 +0900 Subject: [PATCH 14/14] fix: antennas validation (#11469) --- packages/backend/src/server/api/endpoints/antennas/create.ts | 4 ++-- packages/backend/src/server/api/endpoints/antennas/update.ts | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/antennas/create.ts b/packages/backend/src/server/api/endpoints/antennas/create.ts index 74ea74ffd..1f6a3fa73 100644 --- a/packages/backend/src/server/api/endpoints/antennas/create.ts +++ b/packages/backend/src/server/api/endpoints/antennas/create.ts @@ -85,8 +85,8 @@ export default class extends Endpoint { // eslint- private globalEventService: GlobalEventService, ) { super(meta, paramDef, async (ps, me) => { - if ((ps.keywords.length === 0) || ps.keywords[0].every(x => x === '')) { - throw new Error('invalid param'); + if (ps.keywords.flat().every(x => x === '') && ps.excludeKeywords.flat().every(x => x === '')) { + throw new Error('either keywords or excludeKeywords is required.'); } const currentAntennasCount = await this.antennasRepository.countBy({ diff --git a/packages/backend/src/server/api/endpoints/antennas/update.ts b/packages/backend/src/server/api/endpoints/antennas/update.ts index de6a6020c..6247c5469 100644 --- a/packages/backend/src/server/api/endpoints/antennas/update.ts +++ b/packages/backend/src/server/api/endpoints/antennas/update.ts @@ -82,6 +82,9 @@ export default class extends Endpoint { // eslint- private globalEventService: GlobalEventService, ) { super(meta, paramDef, async (ps, me) => { + if (ps.keywords.flat().every(x => x === '') && ps.excludeKeywords.flat().every(x => x === '')) { + throw new Error('either keywords or excludeKeywords is required.'); + } // Fetch the antenna const antenna = await this.antennasRepository.findOneBy({ id: ps.antennaId,