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

handle username and passwords correctly with base64 encoding #862

Closed
wants to merge 2 commits into from
Closed

handle username and passwords correctly with base64 encoding #862

wants to merge 2 commits into from

Conversation

garrensmith
Copy link
Member

No description provided.

const rawCreds = url.slice(startIndex, index);
const colonIndex = rawCreds.indexOf(':');
const username = rawCreds.slice(0, colonIndex);
const password = rawCreds.slice(colonIndex + 1, rawCreds.length);
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor note but I think you could combine all of these variable instantiations and assignments in to a single const statement.

return url;
}

const protocal = url.startsWith("https") ? "https://" : 'http://';
Copy link
Contributor

@millayr millayr Feb 22, 2017

Choose a reason for hiding this comment

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

protocOl :)

@millayr
Copy link
Contributor

millayr commented Feb 22, 2017

+1

@garrensmith
Copy link
Member Author

merged

@garrensmith garrensmith deleted the replication-encode-passwords branch January 3, 2018 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants