fix: remove config file path from login page (#7709)

The login page displayed the full config file path (e.g.
/home/username/.config/code-server/config.yaml), which exposes
the username and system layout to anyone who can see the page.

The path is already printed in the CLI output when starting
code-server, so showing it on the login page is unnecessary.

Fixes #7643
This commit is contained in:
Karesansui
2026-03-19 07:00:54 +09:00
committed by GitHub
parent 13ca0e4731
commit d7599ae360
6 changed files with 6 additions and 6 deletions

View File

@@ -32,7 +32,7 @@ const getRoot = async (req: Request, error?: Error): Promise<string> => {
const welcomeText = req.args["welcome-text"] || (i18n.t("WELCOME", { app: req.args["app-name"] }) as string)
// Determine password message using i18n
let passwordMsg = i18n.t("LOGIN_PASSWORD", { configFile: req.args.config })
let passwordMsg = i18n.t("LOGIN_PASSWORD")
if (req.args.usingEnvPassword) {
passwordMsg = i18n.t("LOGIN_USING_ENV_PASSWORD")
} else if (req.args.usingEnvHashedPassword) {