Skip to content

Fixed empty ssh password case.#297

Open
adrianlasota wants to merge 1 commit intopahaz:masterfrom
adrianlasota:adrianlasota-patch-1
Open

Fixed empty ssh password case.#297
adrianlasota wants to merge 1 commit intopahaz:masterfrom
adrianlasota:adrianlasota-patch-1

Conversation

@adrianlasota
Copy link

fix: Changed if statements for ssh password to allow empty string

This pull request makes small but important improvements to the handling of None values in conditional checks for SSH password authentication in the sshtunnel.py file. These changes ensure more explicit comparisons, improving code clarity and reducing potential errors.

  • Improved conditional checks for None:
    • In _consolidate_auth, updated the condition to explicitly check if ssh_password is None rather than relying on its falsy evaluation. This ensures clarity when distinguishing between None and other falsy values like an empty string.
    • In _connect_to_gateway, replaced the implicit truthiness check of self.ssh_password with an explicit comparison to None, making the intent clearer and avoiding ambiguity.

fix: Changed if statements for ssh password to allow empty string
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.

1 participant