early fail if old password variable (#1350)

This commit is contained in:
Bernd Storath
2024-09-04 18:37:11 +02:00
committed by Philip H
parent 0a6645b526
commit 02589a3ce9
3 changed files with 8 additions and 1 deletions
+5
View File
@@ -28,6 +28,7 @@ const {
PORT,
WEBUI_HOST,
RELEASE,
PASSWORD,
PASSWORD_HASH,
LANG,
UI_TRAFFIC_STATS,
@@ -306,6 +307,10 @@ module.exports = class Server {
}),
);
if (PASSWORD) {
throw new Error('DO NOT USE PASSWORD ENVIRONMENT VARIABLE. USE PASSWORD_HASH INSTEAD.\nSee https://github.com/wg-easy/wg-easy/blob/master/How_to_generate_an_bcrypt_hash.md');
}
createServer(toNodeListener(app)).listen(PORT, WEBUI_HOST);
debug(`Listening on http://${WEBUI_HOST}:${PORT}`);
}