KCupsConnection: Exit authentication loop after too many retries.

Authored by ofreyermuth on Sep 11 2017, 8:15 PM.

Description

KCupsConnection: Exit authentication loop after too many retries.

Summary:
This fixes endless loops for example in the situation
if the server uses IP whitelisting and denies our host
with 403 on each administrative request.
In that case, the passwort_attempt counter is never increased,
which up to now was the only exit condition.
The total_retries counter catches any case in which the
cups API will not call the password callback.

Details at: https://bugs.kde.org/show_bug.cgi?id=383305

Reviewers: dantti

Reviewed By: dantti

Subscribers: cfeck, kde-utils-devel

Differential Revision: https://phabricator.kde.org/D7325

Details