Skip to content

Commit

Permalink
fix: allow ":" character in digestAuth password
Browse files Browse the repository at this point in the history
str.split() -function would cut rest of the password off when encountering a ":" character.
  • Loading branch information
kulpsin authored Sep 10, 2024
1 parent 5c7d555 commit c80e147
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ export function digestAuthHeader(method: string, uri: string, wwwAuthenticate: s
}

let qop = opts.qop || '';
const [ user, pass ] = userpass.split(':');
const user = userpass.split(':', 1);
const pass = userpass.slice(user[0].length+1);

Check failure on line 102 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 20)

Operator '+' must be spaced

Check failure on line 102 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 18)

Operator '+' must be spaced

Check failure on line 102 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 18.19.0)

Operator '+' must be spaced

Check failure on line 102 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (macos-latest, 22)

Operator '+' must be spaced

Check failure on line 102 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 18)

Operator '+' must be spaced

Check failure on line 102 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 18.19.0)

Operator '+' must be spaced

Check failure on line 102 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 20)

Operator '+' must be spaced

Check failure on line 102 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (ubuntu-latest, 22)

Operator '+' must be spaced

Check failure on line 102 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 18)

Operator '+' must be spaced

Check failure on line 102 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 18.19.0)

Operator '+' must be spaced

Check failure on line 102 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 20)

Operator '+' must be spaced

Check failure on line 102 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Node.js / Test (windows-latest, 22)

Operator '+' must be spaced

let nc = String(++NC);
nc = `${NC_PAD.substring(nc.length)}${nc}`;
Expand Down

0 comments on commit c80e147

Please sign in to comment.