From c0d6eb4664107ad58b690dff71f248461f9511ad Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Tue, 12 May 2020 19:19:37 -0400 Subject: [PATCH] Improve password handling - Error out if auth is enabled but no password is passed in - Indicate password location on login page --- .eslintrc.yaml | 1 + package.json | 6 +++--- src/browser/pages/login.html | 2 +- src/node/app/login.ts | 17 +++++++++++++++-- src/node/entry.ts | 22 +++++++++++++--------- 5 files changed, 33 insertions(+), 15 deletions(-) diff --git a/.eslintrc.yaml b/.eslintrc.yaml index e68c237e7..a06f1d766 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -22,6 +22,7 @@ rules: # For overloads. no-dupe-class-members: off "@typescript-eslint/no-use-before-define": off + "@typescript-eslint/no-non-null-assertion": off settings: # Does not work with CommonJS unfortunately. diff --git a/package.json b/package.json index c86e0174f..87696289b 100644 --- a/package.json +++ b/package.json @@ -56,8 +56,7 @@ "stylelint": "^13.0.0", "stylelint-config-recommended": "^3.0.0", "ts-node": "^8.4.1", - "typescript": "3.7.2", - "yarn": "^1.22.4" + "typescript": "3.7.2" }, "resolutions": { "@types/node": "^12.12.7", @@ -79,7 +78,8 @@ "tar": "^6.0.1", "tar-fs": "^2.0.0", "ws": "^7.2.0", - "xdg-basedir": "^4.0.0" + "xdg-basedir": "^4.0.0", + "yarn": "^1.22.4" }, "bin": { "code-server": "out/node/entry.js" diff --git a/src/browser/pages/login.html b/src/browser/pages/login.html index 6f8ce250e..37d51f203 100644 --- a/src/browser/pages/login.html +++ b/src/browser/pages/login.html @@ -26,7 +26,7 @@

Welcome to code-server

-
Please log in below. Check code-server's logs for the generated password.
+
Please log in below. {{PASSWORD_MSG}}