Fix setting basic auth creds with env

This commit is contained in:
Cohee
2025-02-20 22:38:47 +02:00
parent 73784642d2
commit 00bb36f764
2 changed files with 7 additions and 5 deletions

View File

@@ -876,8 +876,9 @@ const postSetupTasks = async function (v6Failed, v4Failed, useIPv6, useIPv4) {
'Per-user basic authentication is enabled, but user accounts are disabled. This configuration may be insecure.',
));
} else if (!perUserBasicAuth) {
const basicAuthUser = getConfigValue('basicAuthUser', {});
if (!basicAuthUser?.username || !basicAuthUser?.password) {
const basicAuthUserName = getConfigValue('basicAuthUser.username', '');
const basicAuthUserPassword = getConfigValue('basicAuthUser.password', '');
if (!basicAuthUserName || !basicAuthUserPassword) {
console.warn(color.yellow(
'Basic Authentication is enabled, but username or password is not set or empty!',
));