mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-28 22:49:24 +09:00
fix(backend): ジョブキュー管理画面の認証を回避できる問題を修正 (MisskeyIO#207)
cheery-picked from c9aeccb2ab
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
parent
ac3c6f3df8
commit
6a06711ffd
@ -144,7 +144,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);
|
||||||
|
Loading…
Reference in New Issue
Block a user