summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEsurio/1673beta <60435625+1673beta@users.noreply.github.com>2025-02-26 10:56:23 +0900
committerGitHub <noreply@github.com>2025-02-26 01:56:23 +0000
commitbd13fb626c599ad24b63bb617e71e3f88c825d1a (patch)
tree69822992a9202018ba464a6970ffde9ebaaf14dd
parentfix(frontend): ユーザのサジェスト中に@を入力してもサジェ... (diff)
downloadsharkey-bd13fb626c599ad24b63bb617e71e3f88c825d1a.tar.gz
sharkey-bd13fb626c599ad24b63bb617e71e3f88c825d1a.tar.bz2
sharkey-bd13fb626c599ad24b63bb617e71e3f88c825d1a.zip
fix(backend): S3_SAFEかつURL_SAFEでない文字列をprefixに使えないように (#15455)
* fix(backend): S3_SAFEかつURL_SAFEでない文字列をprefixに使えないように * update CHANGELOG * fix validation * fix: remove unused import --------- Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
-rw-r--r--CHANGELOG.md1
-rw-r--r--packages/backend/src/server/api/endpoints/admin/update-meta.ts2
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5066b95a19..db29385d73 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -29,6 +29,7 @@
- Fix: pgroongaでの検索時にはじめのキーワードのみが検索に使用される問題を修正
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/886)
- Fix: メールアドレスの形式が正しくなければ以降の処理を行わないように
+- Fix: `update-meta`でobjectStoragePrefixにS3_SAFEかつURL-safeでない文字列を使えないように
- Fix: クリップの説明欄を更新する際に空にできない問題を修正
- Fix: フォロワーではないユーザーにリノートもしくは返信された場合にノートのDeleteアクティビティが送られていない問題を修正
diff --git a/packages/backend/src/server/api/endpoints/admin/update-meta.ts b/packages/backend/src/server/api/endpoints/admin/update-meta.ts
index 1cfa9cffa6..45c012cb0a 100644
--- a/packages/backend/src/server/api/endpoints/admin/update-meta.ts
+++ b/packages/backend/src/server/api/endpoints/admin/update-meta.ts
@@ -118,7 +118,7 @@ export const paramDef = {
useObjectStorage: { type: 'boolean' },
objectStorageBaseUrl: { type: 'string', nullable: true },
objectStorageBucket: { type: 'string', nullable: true },
- objectStoragePrefix: { type: 'string', nullable: true },
+ objectStoragePrefix: { type: 'string', pattern: /^[a-zA-Z0-9-._]*$/.source, nullable: true },
objectStorageEndpoint: { type: 'string', nullable: true },
objectStorageRegion: { type: 'string', nullable: true },
objectStoragePort: { type: 'integer', nullable: true },