Skip to content

Commit eef96b3

Browse files
committed
use double-quotes
1 parent 93d71bb commit eef96b3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

server/handlers/links.handler.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -504,15 +504,15 @@ async function redirect(req, res, next) {
504504

505505
// 6. If link is protected, redirect to password page
506506
if (link.password) {
507-
if ('authorization' in req.headers) {
507+
if ("authorization" in req.headers) {
508508
const auth = req.headers.authorization;
509-
const firstSpace = auth.indexOf(' ');
509+
const firstSpace = auth.indexOf(" ");
510510
if (firstSpace !== -1) {
511511
const method = auth.slice(0, firstSpace);
512512
const payload = auth.slice(firstSpace + 1);
513-
if (method === 'Basic') {
514-
const decoded = Buffer.from(payload, 'base64').toString('utf8');
515-
const colon = decoded.indexOf(':');
513+
if (method === "Basic") {
514+
const decoded = Buffer.from(payload, "base64").toString("utf8");
515+
const colon = decoded.indexOf(":");
516516
if (colon !== -1) {
517517
const password = decoded.slice(colon + 1);
518518
const matches = await bcrypt.compare(password, link.password);

0 commit comments

Comments
 (0)