Skip to content

Commit 7538da5

Browse files
fix: V-001 security vulnerability
Automated security fix generated by OrbisAI Security
1 parent dd48f77 commit 7538da5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/node/routes/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { App } from "../app"
1111
import { AuthType, DefaultedArgs } from "../cli"
1212
import { commit, rootPath } from "../constants"
1313
import { Heart } from "../heart"
14-
import { redirect } from "../http"
14+
import { ensureAuthenticated, redirect } from "../http"
1515
import { CoderSettings, SettingsProvider } from "../settings"
1616
import { UpdateProvider } from "../update"
1717
import { getMediaMime, paths } from "../util"
@@ -113,7 +113,7 @@ export const register = async (
113113
app.router.all("/proxy/:port{/*path}", async (req, res) => {
114114
await pathProxy.proxy(req, res)
115115
})
116-
app.wsRouter.get("/proxy/:port{/*path}", async (req) => {
116+
app.wsRouter.get("/proxy/:port{/*path}", ensureAuthenticated, async (req) => {
117117
await pathProxy.wsProxy(req as unknown as WebsocketRequest)
118118
})
119119
// These two routes pass through the path directly.
@@ -125,7 +125,7 @@ export const register = async (
125125
proxyBasePath: args["abs-proxy-base-path"],
126126
})
127127
})
128-
app.wsRouter.get("/absproxy/:port{/*path}", async (req) => {
128+
app.wsRouter.get("/absproxy/:port{/*path}", ensureAuthenticated, async (req) => {
129129
await pathProxy.wsProxy(req as unknown as WebsocketRequest, {
130130
passthroughPath: true,
131131
proxyBasePath: args["abs-proxy-base-path"],

0 commit comments

Comments
 (0)