After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 684431 - Prompting for PolicyKit passwords should allow retry
Prompting for PolicyKit passwords should allow retry
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.5.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 675334 684488 692293 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-09-20 07:58 UTC by Stef Walter
Modified: 2013-05-13 19:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
polkitAgent: Allow retrying mistyped passwords (6.24 KB, patch)
2013-04-17 09:07 UTC, Stef Walter
committed Details | Review

Description Stef Walter 2012-09-20 07:58:26 UTC
When prompting for policykit passwords, and the user gets the password wrong, the prompt acts in very confusingly:

The prompt remains responsive, displays yellow message for a second or two, and then disappears, even though the user may have started typing a new password.

The user should be given a chance to enter a new password if the previous try was wrong. To duplicate, do this and enter a bad password.

[stef@stef-rawhide ~]$ pkexec bash
Error executing command as another user: Not authorized

This incident has been reported.

In addition printing stuff like the above snarky comment about reporting the incident mocks the user for mistyping his password :S
Comment 1 Allan Day 2012-09-20 11:41:22 UTC
Dupe of bug 675334?
Comment 2 Stef Walter 2012-09-20 12:27:57 UTC
Indeed. Tried searching for it, but couldn't find it.

*** This bug has been marked as a duplicate of bug 675334 ***
Comment 3 David Zeuthen (not reading bugmail) 2012-09-20 12:29:02 UTC
Yes, the shell should probably retry three times or so. I've said many times I'm fine with such a change but no-one has implemented it yet :-)

(For the record compare with other PAM applications such as sudo(8), su(1) etc. and you will find there is no consensus on how many retries the user gets.)
Comment 4 Stef Walter 2012-09-20 12:39:29 UTC
FWIW, the entire prompt-3-times-and-then-give-up stuff is just security theater in a GUI program.

It only makes sense in a case like the 'login' program (the console one) where you can actually control how long it takes before the user is able to try again. 

With the user able to just immediately do another 'set of tries' again after their initial 3 tries, it's just plain annoying. It doesn't add any real security value in this context. We already have them wait between tries anyway. 

And if maxing out at three tries is some sort of way from preventing the user from getting into an endless loop, well then that really doesn't make sense in a GUI program. There's a cancel button right there. Console apps don't have this obvious cancel button (since Ctrl-C isn't discoverable). So we shouldn't be taking our cues from console apps in this case.
Comment 5 David Zeuthen (not reading bugmail) 2012-09-20 13:59:55 UTC
(In reply to comment #4)
> FWIW, the entire prompt-3-times-and-then-give-up stuff is just security theater
> in a GUI program.

I never claimed anything about security or retries - not sure where you got that idea. The reason it works the way it does today (no retries), has nothing to do with security.
Comment 6 Stef Walter 2012-09-20 15:20:54 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > FWIW, the entire prompt-3-times-and-then-give-up stuff is just security theater
> > in a GUI program.
> 
> I never claimed anything about security or retries - not sure where you got
> that idea. The reason it works the way it does today (no retries), has nothing
> to do with security.

Heh, I didn't claim you claimed anything about security :)

What I do claim however is that limiting to a specific number of retries has no real purpose.
Comment 7 Matthias Clasen 2012-09-20 17:35:30 UTC
*** Bug 684488 has been marked as a duplicate of this bug. ***
Comment 8 Florian Müllner 2013-01-22 14:02:29 UTC
*** Bug 692293 has been marked as a duplicate of this bug. ***
Comment 9 Florian Müllner 2013-01-22 14:04:54 UTC
*** Bug 675334 has been marked as a duplicate of this bug. ***
Comment 10 Age Bosma (IRC: Forage) 2013-01-23 14:23:00 UTC
@Allen: since Every Detail Matters suggestions should be reported to you, I'd say this issue would be a perfect candidate for it, don't you think? It's a relatively small but frustrating issue.
Comment 11 Stef Walter 2013-04-17 09:07:10 UTC
Created attachment 241718 [details] [review]
polkitAgent: Allow retrying mistyped passwords

Don't hide the polkit agent window when someone mistypes their password.
Allow them to try again. The user can cancel at any point.
Comment 12 Stef Walter 2013-04-17 09:07:49 UTC
This patch was tested on gnome-shell 3.8.1
Comment 13 Florian Müllner 2013-05-13 14:19:23 UTC
Review of attachment 241718 [details] [review]:

LGTM (tested on master only, assuming it works fine on 3-8 as well)
Comment 14 Stef Walter 2013-05-13 19:11:18 UTC
Attachment 241718 [details] pushed as 9659d05 - polkitAgent: Allow retrying mistyped passwords

Thanks for the review. Pushed to gnome-3-8 and master