Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix infinite loop when an empty or blank password is given #303

Closed
wants to merge 1 commit into from

Conversation

egashira-yusuke
Copy link

This is fix for #299.

The connection string used by pg_repack was missing password quotes.
It also adds retry processing so that if an empty password is entered, the password prompt does not remember it.

pg_repack hanged when entering an empty or blank string at the password prompt.
@mvdobrinin
Copy link

This should help with #315.

Copy link
Collaborator

@za-arthur za-arthur 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 the PR. What about instead of another infinite loop like here:

do {
    buf = simple_prompt("Password: ", BUFSIZE, false);
} while (strlen(buf) == 0);

just fail with error no password supplied after prompt_for_password() returned empty string?
This will be similar behavior to psql's.

@andreasscherbaum
Copy link
Collaborator

@egashira-yusuke Since this PR is fixing an issue with empty passwords: can you add a test which shows that empty passwords are no longer an issue?

@andreasscherbaum
Copy link
Collaborator

Fixed in #354 instead.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WARNING: Unable to set up worker conn #0: FATAL: password authentication failed for user "master"
4 participants