1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-07-26 15:04:38 +02:00
Commit Graph

7 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
a69400289d fix: prevent immutable cache headers on file access errors
When a file exists in the database as storedInternal but is missing from
disk, the error response was incorrectly getting Cache-Control:
max-age=31536000, immutable. This was because the handler set immutable
cache headers before attempting to stream the file, and by the time the
stream encountered the ENOENT error, HTTP headers were already committed.

Fix: add fs.promises.access() check in FileServerFileResolver for stored
original files before returning the path. If the file is not accessible
on disk, the access check throws, propagating to errorHandler which
correctly sets Cache-Control: max-age=300.

For thumbnail/webpublic stored files, detectType() already performed this
check implicitly via fs.stat(). Only original files were affected.

This fixes both the /files/:key and /proxy/:url* endpoints since both
call resolveFileByAccessKey for local files.

Agent-Logs-Url: https://github.com/misskey-dev/misskey/sessions/5dd1c781-b9ad-43cf-b107-79c502d2e602

Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
2026-04-07 13:31:53 +00:00
おさむのひと
106fffdcfe chore(backend): FileServerServiceのunit-testを追加 (#17086)
* add test

* fix

* fix type error
2026-01-11 11:34:29 +09:00
syuilo
e4b7a1f4e1 fix tests
* test

* Update activitypub.ts

* Update activitypub.ts

* Update create.ts

* Update create.ts

* Update endpoints.ts
2025-05-29 12:41:27 +09:00
かっこかり
07c2de3749 fix(backend): typeormのbreaking changeに対応 (#16105)
* fix(backend): typeormのbreaking changeに対応

* attempt to fix test
2025-05-27 13:50:45 +09:00
おさむのひと
8c0c503c6c refactor: ファイルアップロード時のテストを追加 (#15928)
* refactor: ファイルアップロード時のテストを追加

* なぜかsemverが消えてた
2025-05-04 09:38:35 +09:00
おさむのひと
526057cc61 Revert "fix: 添付ファイルのあるリクエストを受けたときの初動を改善 (#15896)" (#15927)
* Revert "fix: 添付ファイルのあるリクエストを受けたときの初動を改善 (#15896)"

This reverts commit 7e8cc4d7c0.

* fix CHANGELOG.md
2025-05-03 16:23:06 +09:00
おさむのひと
7e8cc4d7c0 fix: 添付ファイルのあるリクエストを受けたときの初動を改善 (#15896)
* wip

* ロールポリシーの値も参照するように

* エンドポイントのテストを追加

* fix review

* add spdx

* fix CHANGELOG.md

* fix test

* regenerate

* add log

* Revert "add log"

This reverts commit 4b2bf59a60.

* add log

* fix

* Revert "add log"

This reverts commit c5a73d57da.
2025-04-29 08:15:09 +09:00