fix(backend): ジョブキュー管理画面の認証を回避できる問題を修正

This commit is contained in:
syuilo 2023-08-20 10:00:10 +09:00
parent e6032a03b6
commit c9aeccb2ab
2 changed files with 4 additions and 1 deletions

View File

@ -39,6 +39,7 @@
- ファイルアップロード時等にファイル名の拡張子を修正する関数(correctFilename)の挙動を改善 - ファイルアップロード時等にファイル名の拡張子を修正する関数(correctFilename)の挙動を改善
- Fix: 一部のfeatured noteを照会できない問題を修正 - Fix: 一部のfeatured noteを照会できない問題を修正
- Fix: muteがapiからのuser list timeline取得で機能しない問題を修正 - Fix: muteがapiからのuser list timeline取得で機能しない問題を修正
- Fix: ジョブキュー管理画面の認証を回避できる問題を修正
## 13.14.2 ## 13.14.2

View File

@ -143,7 +143,9 @@ export class ClientServerService {
// Authenticate // Authenticate
fastify.addHook('onRequest', async (request, reply) => { 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; const token = request.cookies.token;
if (token == null) { if (token == null) {
reply.code(401); reply.code(401);