QAuth.: Reset the nonce-count when the server requests using a new nonce
Some servers have an upper limit on how many times a nonce can be reused. Because the nc was not being reset the server would get a high nc and would close the connection. Change-Id: I71d5a316f79777a45c7323d93e28b3845aefcfad Original-patch-by: Benjamin Reikowski Pick-to: 5.15 Fixes: QTBUG-85729 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>bb10
parent
e8997cb05e
commit
bbb3619a13
|
|
@ -463,8 +463,10 @@ void QAuthenticatorPrivate::parseHttpResponse(const QList<QPair<QByteArray, QByt
|
|||
break;
|
||||
case DigestMd5: {
|
||||
this->options[QLatin1String("realm")] = realm = QString::fromLatin1(options.value("realm"));
|
||||
if (options.value("stale").compare("true", Qt::CaseInsensitive) == 0)
|
||||
if (options.value("stale").compare("true", Qt::CaseInsensitive) == 0) {
|
||||
phase = Start;
|
||||
nonceCount = 0;
|
||||
}
|
||||
if (user.isEmpty() && password.isEmpty())
|
||||
phase = Done;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue