Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: split basic auth into max. two parts to allow ':' in passwords #1136

Merged
merged 2 commits into from
Feb 24, 2023

Conversation

0utplay
Copy link
Member

@0utplay 0utplay commented Feb 23, 2023

Motivation

Splitting the password without any limitation would result in problems when the password of the user contains a ':' by itself.

Modification

Made sure that the base64 string is only split into two sections: username:password and any ':' in the password are ignored.

Result

Passwords containing a ':' can be used now.

Other context

Fixes #1073

@0utplay 0utplay added the in: node An issue/pull request releated to the node module code label Feb 23, 2023
@0utplay 0utplay added this to the 4.0.0-RC8 milestone Feb 23, 2023
@0utplay 0utplay self-assigned this Feb 23, 2023
@derklaro derklaro added v: 4.X This pull should be included in the 4.0 release t: fix A pull request introducing a fix for a bug. labels Feb 24, 2023
Copy link
Member

@derklaro derklaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should polish the code around that in the future...

@derklaro derklaro merged commit 667a21e into nightly Feb 24, 2023
@derklaro derklaro deleted the rest-password-split branch February 24, 2023 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: node An issue/pull request releated to the node module code t: fix A pull request introducing a fix for a bug. v: 4.X This pull should be included in the 4.0 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Basic rest auth not working when password contains ':'
2 participants