eslint

71236e5e8c9183e8a3910a190e30ee425bec614d

QuantumEntangledAndy <sheepchaan@gmail.com>

Signed
2 files changed, +5 -6Ignore whitespace
src/middleware/basicAuth.js+0 -1
@@ -31,7 +31,6 @@ const basicAuthMiddleware = async function (request, response, callback) {
31 .toString('utf8')31 .toString('utf8')
32 .split(':');32 .split(':');
3333
34
35 if (! PERUSER_BASIC_AUTH && username === config.basicAuthUser.username && password === config.basicAuthUser.password) {34 if (! PERUSER_BASIC_AUTH && username === config.basicAuthUser.username && password === config.basicAuthUser.password) {
36 return callback();35 return callback();
37 } else if (PERUSER_BASIC_AUTH) {36 } else if (PERUSER_BASIC_AUTH) {
src/users.js+5 -5
@@ -624,7 +624,7 @@ async function authelia_user_login(request) {
624 return false;624 return false;
625 }625 }
626626
627 const remote_user = request.get("Remote-User");627 const remote_user = request.get('Remote-User');
628 if (!remote_user) {628 if (!remote_user) {
629 return false;629 return false;
630 }630 }
@@ -652,18 +652,18 @@ async function basic_user_login(request) {
652 return false;652 return false;
653 }653 }
654654
655 const auth_header = request.get("Authorization");655 const auth_header = request.get('Authorization');
656 if (!auth_header) {656 if (!auth_header) {
657 return false;657 return false;
658 }658 }
659659
660 const parts = auth_header.split(' ');660 const parts = auth_header.split(' ');
661 if (!parts || parts.length < 2 || parts[0].toLowerCase() != "basic") {661 if (!parts || parts.length < 2 || parts[0].toLowerCase() != 'basic') {
662 return false;662 return false;
663 }663 }
664664
665 const b64auth = parts[1];665 const b64auth = parts[1];
666 const [login, password] = Buffer.from(b64auth, 'base64').toString().split(':')666 const [login, password] = Buffer.from(b64auth, 'base64').toString().split(':');
667667
668 const userHandles = await getAllUserHandles();668 const userHandles = await getAllUserHandles();
669 for (const userHandle of userHandles) {669 for (const userHandle of userHandles) {
@@ -681,7 +681,7 @@ async function basic_user_login(request) {
681 }681 }
682 }682 }
683 }683 }
684 684
685 return false;685 return false;
686}686}
687687