KCupsConnection: Exit authentication loop after too many retries.
ClosedPublic

Authored by ofreyermuth on Aug 15 2017, 11:55 AM.

Details

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

Diff Detail

Repository
R363 Print Manager
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ofreyermuth created this revision.Aug 15 2017, 11:55 AM
Restricted Application added a subscriber: kde-utils-devel. · View Herald TranscriptAug 15 2017, 11:55 AM
cfeck added a subscriber: cfeck.Aug 21 2017, 11:17 PM
cfeck added inline comments.
libkcups/KCupsConnection.cpp
807

Add spaces around +

Add spaces around "+" .

dantti accepted this revision.Sep 7 2017, 2:00 AM

The patch looks good to me, though I could not test it myself yet, I see no reason not to push it.
Thanks

This revision is now accepted and ready to land.Sep 7 2017, 2:00 AM
This revision was automatically updated to reflect the committed changes.