commandprompt / pgmanage

Web tool for database management
https://commandprompt.com
Other
589 stars 18 forks source link

Fall back to unencrypted ssh key when no password is provided #484

Closed El-Virus closed 2 weeks ago

El-Virus commented 2 weeks ago

Currently, when using a SSH tunnel, if the SSH key is not encrypted with a password (so the user leaves the passphrase field empty), trying to establish a tunnel will result in PgManage throwing an error (password and salt must not be empty).

This is because an empty string is passed to from_private_key. This commit makes it so that when calling from_private_key if the password string is empty, it defaults to None, which is the expected value for unencrypted keys.