Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow ":" character in digestAuth password (#532)
`str.split()` -function would cut rest of the password off when encountering a "`:`" character. Old: ```javascript let s = 'user:passwordwith:character'; const [user, pass] = userpass.split(':'); console.log(`User '${user}' and pass '${pass}'`); ``` Output: `User 'user' and pass 'passwordwith'` Fixed: ```javascript const user = userpass.split(':', 1); const pass = userpass.slice(user[0].length+1); console.log(`User '${user}' and pass '${pass}' ``` Output: `User 'user' and pass 'passwordwith:character'` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved the extraction process for username and password from the userpass string, enhancing clarity and maintainability. - **Refactor** - Refined the logic within the digest authentication header function for better readability without altering its overall functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Loading branch information