pop-os / gnome-control-center

Pop!_OS fork of https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-control-center
GNU General Public License v2.0
29 stars 10 forks source link

groovy: Add patch to not enforce password strength requirements #136

Closed ids1024 closed 3 years ago

ids1024 commented 3 years ago

Gnome Initial Setup doesn't seem to be enforcing this, and since libpam-pwquality isn't installed by default, presumably tools like passwd aren't.

Perhaps the way Gnome handles this could be done better.

jacobgkau commented 3 years ago

This reduces G-C-C's required password strength to be in line with GIS and the passwd command. The textual hints for creating stronger passwords are still shown, which I think is okay:

Screenshot from 2021-01-06 08-46-37

Screenshot from 2021-01-06 08-46-12

However, I did find a small regression. There's still at least one operation that G-C-C wouldn't allow, but passwd wouldn't allow it either (I'm able to append a single character to a password, but I can't remove a single character from a password):

Screenshot from 2021-01-06 08-48-33

Screenshot from 2021-01-06 08-49-00

Screenshot from 2021-01-06 08-49-18

That's not a problem, but after dismissing that pop-up and attempting to change the password again, the dialog hangs:

Screenshot from 2021-01-06 08-51-13

This does not occur on master. Presumably, G-C-C isn't handling the error correctly when I attempt to make a bad change, since it normally wouldn't allow me to attempt that change in the first place (it greys out the second password box and stops me before I get as far as clicking the Change button):

Screenshot from 2021-01-06 09-03-01

ids1024 commented 3 years ago

Ah, must be an upstream issue that generally doesn't occur. It seems passwd is still running in the background as a child of gnome-control-center, so some of the logic related to that subprocess probably needs to be changed.

ids1024 commented 3 years ago

I've updated this and https://github.com/pop-os/gnome-control-center/pull/137 with a patch that seems to fix the issue described above, with a workaround for the fact that run-passwd.c is generally a buggy mess and a questionable idea.

jacobgkau commented 3 years ago

The latest patch fixed the previous case I had trouble with (after a failed change attempt, I'm able to try again and change it successfully.)

I am now seeing that after the changes, once I type my old password in, the Change button becomes immediately active (before typing any new password); if I click Change before I type a new password, I get a hang:

Screenshot from 2021-01-12 09-13-13

Screenshot from 2021-01-12 09-13-18

ids1024 commented 3 years ago

Updated patches to not allow empty new password (since that doesn't seem to work), and the reset sensitivity of the button after the dialog displays a failure.

ids1024 commented 3 years ago

Great! Now it should be at least no more broken than the password setting code was before this.