Skip to content

Commit 83c16ad

Browse files
committed
permit empty-string passwords at the prompt
Previously the behavior was to keep prompting until a nonempty value was entered, disallowing the empty string as a password.
1 parent 94b6675 commit 83c16ad

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Bug Fixes
1515
* Guard against missing contributors file on startup.
1616
* Friendlier errors on password-file failures.
1717
* Better handle empty-string passwords.
18+
* Permit empty-string passwords at the interactive prompt.
1819

1920

2021
Internal

mycli/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,9 @@ def _connect() -> None:
488488
if password_from_file is not None:
489489
new_passwd = password_from_file
490490
else:
491-
new_passwd = click.prompt(f"Password for {user}", hide_input=True, show_default=False, type=str, err=True)
491+
new_passwd = click.prompt(
492+
f"Password for {user}", hide_input=True, show_default=False, default='', type=str, err=True
493+
)
492494
self.sqlexecute = SQLExecute(
493495
database,
494496
user,

0 commit comments

Comments
 (0)