Skip to content

Avoid endless loading cycle when inputting empty password - #473

Open
fallenwood wants to merge 3 commits into
pop-os:masterfrom
fallenwood:fix_empty_password_cycling
Open

Avoid endless loading cycle when inputting empty password#473
fallenwood wants to merge 3 commits into
pop-os:masterfrom
fallenwood:fix_empty_password_cycling

Conversation

@fallenwood

@fallenwood fallenwood commented Jun 19, 2026

Copy link
Copy Markdown
  • I have disclosed use of any AI generated code in my commit messages.
    • If you are using an LLM, and do not fully understand the changes it is making to the code base, do not create a PR.
    • In our experience, AI generated code often results in overly complex code that lacks enough context for a proper fix or feature inclusion. This results in considerably longer code reviews. Due to this, AI authored or partially authored PRs may be closed without comment.
  • I understand these changes in full and will be able to respond to review comments.
  • My change is accurately described in the commit message.
  • My contribution is tested and working as described.
  • I have read the Developer Certificate of Origin and certify my contribution under its conditions.

Environment: Fedora 44, amd64

Current Behavior: It enters endless loading cycle if the input password is empty, also see #407

New Behavior: It aligns with PAM, if the password is empty,

  1. It shows another prompt for password from PAM, so the greeter does nothing to wait for user to input password again
  2. If the password is empty on the next try, it show incorrent password prompt

LLM Usage:

  1. Github Copilot with GPT-5.4
  2. Github Copilot with GPT-5.6-sol

Comment thread examples/server.rs
let (socket, _addr) = listener.accept().await.unwrap();
println!("new connection");

let mut empty_password_reprompted = false;

@mmstick mmstick Jul 29, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shouldn't this logic be in cosmic-greeter instead of the example? Is this necessary for the example to check if a password is empty?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It's used to simulate the real case, because it has different behavior on my fedora devbox when sending empty password for the 1st time and later

@mmstick
mmstick requested a review from a team July 29, 2026 16:03
@mmstick

mmstick commented Jul 29, 2026

Copy link
Copy Markdown
Member

PR requires to be rebased

@fallenwood

Copy link
Copy Markdown
Author

PR requires to be rebased

Thanks, I found the issue got regression after resolving conflicts, I'll take another look on it

@fallenwood

Copy link
Copy Markdown
Author

Done rebasing

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.

2 participants