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 websocket provider basic auth handling #2593

Merged
merged 2 commits into from
Mar 29, 2019
Merged

fix websocket provider basic auth handling #2593

merged 2 commits into from
Mar 29, 2019

Conversation

chaseadam
Copy link

Description

Previous handling of basic authentication credentials created base64 buffer concatenated user/pass. Should be creating buffer of base64 encoded string.

url-parse used always includes .auth object which overrides header built using .username and .password. Switch to else if.

NOTE: Fix does not address the lack of testing around the URL.auth object

I was unable to test against the ethereum test network because I couldn't figure out how to load the module locally (I am brand new to node).

Type of change

  • Bug fix

Checklist:

  • I have selected the correct base branch.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no warnings.
  • I have updated or added types for all modules I've changed
  • Any dependent changes have been merged and published in downstream modules.
  • I ran npm run test in the root folder with success and extended the tests if necessary.
  • I ran npm run build in the root folder and tested it in the browser and with node.
  • I ran npm run dtslint in the root folder and tested that all my types are correct
  • I have tested my code on an ethereum test network.

@nivida nivida added Bug Addressing a bug In Progress Currently being worked on labels Mar 27, 2019
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.08%) to 95.66% when pulling 0e95560 on chaseadam:1.0 into 9dfc93e on ethereum:1.0.

@coveralls
Copy link

coveralls commented Mar 27, 2019

Coverage Status

Coverage decreased (-0.08%) to 95.616% when pulling 91637b2 on chaseadam:1.0 into 5dccc72 on ethereum:1.0.

@nivida nivida removed the In Progress Currently being worked on label Mar 29, 2019
@nivida
Copy link
Contributor

nivida commented Mar 29, 2019

Thanks! I'll merge this PR and will test the URL.auth object.

@nivida nivida merged commit 50c8e4d into web3:1.0 Mar 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Addressing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants