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

feat: strip uri credentials from logs #884

Merged
merged 2 commits into from Jul 18, 2022
Merged

Conversation

banteg
Copy link
Contributor

@banteg banteg commented Jul 18, 2022

what was wrong

when using a connection uri which contains user:pass, it was output as plain text:

INFO: Connecting to existing Erigon node at 'https://bunny:carrot123@bunny-server.com/'.

how i fixed it

added GethProvider._clean_uri which strips username and password from connection string and use it when we print it. the yarl package i import is a dependency to web3.

now it's printed like this:

INFO: Connecting to existing Erigon node at 'https://bunny-server.com/'.

Checklist

  • All changes are completed
  • New test cases have been added
  • Documentation has been updated

@fubuloubu fubuloubu merged commit d3d4280 into ApeWorX:main Jul 18, 2022
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