Skip to content

Avoid redundant password prompts

Previously, cancelling the password prompt would lead to another password prompt popping up. This would continue indefinitely which is both frustrating but also difficult to escape from for normal users.

The cause for this is that when entering an admin protocol location various requests are made from various parts of the application. For example in Dolphin some requests come from the location bar and some from the view. All of those read calls stack and wait for their turn to present a password prompt even though all these read calls aim to do a similar thing and when one of them is denied this also means that the others are supposed to be denied.

This commit makes sure that after a password prompt is cancelled no new one will pop up. This is accomplished by automatically preventing password prompts that are similar to the one that was just denied/cancelled.

Currently password prompts for stat or listDir authorization requests are considered similar when they want to appear in a similar time frame. This takes into account both the time of the original request as well as when the user has finally acted on the prompt.

If this approach -- which mostly resolves around timing -- proves insufficient to decide similarity of requests, this can easily be adapted to be more targeted or elaborate later.

This commit does not change the privileged worker to keep that one as minimal and secure as possible.

Edited by Felix Ernst

Merge request reports