diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2014-04-22 14:52:13 +0400 |
---|---|---|
committer | Olivier Goffart <ogoffart@woboq.com> | 2014-04-22 14:52:13 +0400 |
commit | 707c6fcc5d3c3ba29676e79af4129448052ad2ac (patch) | |
tree | 0ca8ab1450735ce172ad6f42d3468e360e8faab3 /src/creds | |
parent | edb1f61241bb6fe11cce1b85933c534b61edb5a2 (diff) |
An abort on the reply is not usually a password error.
Copy the code from HTTPCredidentials
Diffstat (limited to 'src/creds')
-rw-r--r-- | src/creds/tokencredentials.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/creds/tokencredentials.cpp b/src/creds/tokencredentials.cpp index 0804cc5d4..4328811cd 100644 --- a/src/creds/tokencredentials.cpp +++ b/src/creds/tokencredentials.cpp @@ -68,6 +68,7 @@ int getauth(const char *prompt, } const char userC[] = "user"; +const char authenticationFailedC[] = "owncloud-authentication-failed"; } // ns @@ -172,7 +173,8 @@ bool TokenCredentials::stillValid(QNetworkReply *reply) { return ((reply->error() != QNetworkReply::AuthenticationRequiredError) // returned if user or password is incorrect - && (reply->error() != QNetworkReply::OperationCanceledError)); + && (reply->error() != QNetworkReply::OperationCanceledError + || !reply->property(authenticationFailedC).toBool())); } QString TokenCredentials::queryPassword(bool *ok) @@ -209,6 +211,7 @@ void TokenCredentials::slotAuthentication(QNetworkReply* reply, QAuthenticator* // instead of utf8 encoding. Instead, we send it manually. Thus, if we reach this signal, // those credentials were invalid and we terminate. qDebug() << "Stop request: Authentication failed for " << reply->url().toString(); + reply->setProperty(authenticationFailedC, true); reply->close(); } |