Skip to content

Commit 48d1539

Browse files
Merge commit from fork
[GHSA-gq5q-c77c-v236](GHSA-gq5q-c77c-v236) Signed-off-by: eternal-flame-AD <[email protected]>
1 parent 8b6d321 commit 48d1539

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
- Fix: デッキのタイムラインカラムで「センシティブなファイルを含むノートを表示」設定が使用できなかった問題を修正
1616

1717
### Server
18-
-
19-
18+
- Fix: Nested proxy requestsを検出した際にブロックするように
19+
[ghsa-gq5q-c77c-v236](https://github.com/misskey-dev/misskey/security/advisories/ghsa-gq5q-c77c-v236)
2020

2121
## 2024.10.1
2222

packages/backend/src/server/FileServerService.ts

+6
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,12 @@ export class FileServerService {
319319
);
320320
}
321321

322+
if (!request.headers['user-agent']) {
323+
throw new StatusError('User-Agent is required', 400, 'User-Agent is required');
324+
} else if (request.headers['user-agent'].toLowerCase().indexOf('misskey/') !== -1) {
325+
throw new StatusError('Refusing to proxy a request from another proxy', 403, 'Proxy is recursive');
326+
}
327+
322328
// Create temp file
323329
const file = await this.getStreamAndTypeFromUrl(url);
324330
if (file === '404') {

0 commit comments

Comments
 (0)