Skip to content

Don't print password by default in debug #178

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

Merged
merged 2 commits into from
Apr 27, 2023

Conversation

zachariahpifer
Copy link
Contributor

closes #156

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Thank you for the PR! One suggestion.

@@ -563,17 +563,23 @@ def connect(self, secrets):
that contains a 'ssid' and 'password' entry"""
self.connect_AP(secrets["ssid"], secrets["password"])

def connect_AP(self, ssid, password, timeout_s=10): # pylint: disable=invalid-name
def connect_AP(
self, ssid, password, timeout_s=10, show_password=False
Copy link
Member

Choose a reason for hiding this comment

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

I'd rather not have the kwarg here. I think it should go next to the debug flag. It could be debug_show_secrets to cover other sorts of keys in addition to the password.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good thinking! To be clear, you're suggesting it should be an init param?

Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

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

Thanks for working on this @zachariahpifer!

The latest version of this looks good to me. I haven't tested on hardware. Will try it out in the next few days if it's still open.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Yup! That's what I was thinking.

@tannewt tannewt merged commit 3287853 into adafruit:main Apr 27, 2023
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jun 23, 2023
Updating https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI to 5.0.6 from 5.0.5:
  > Update .pylintrc, fix jQuery for docs
  > Run pre-commit
  > Update pre-commit hooks
  > Merge pull request adafruit/Adafruit_CircuitPython_ESP32SPI#178 from zachariahpifer/dont_print_password_in_debug
  > Add upload url to release action
  > Add .venv to .gitignore
  > Update .pylintrc for v2.15.5
  > Fix release CI files
  > Update pylint to 2.15.5
  > Updated pylint version to 2.13.0
  > Switching to composite actions

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Updated download stats for the libraries
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.

Prints password in clear text if debug is True
3 participants