[Pkg-owncloud-commits] [owncloud-client] 50/103: An abort on the reply is not usually a password error.

Sandro Knauß hefee-guest at moszumanska.debian.org
Wed Apr 30 18:08:58 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 707c6fcc5d3c3ba29676e79af4129448052ad2ac
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Tue Apr 22 12:52:13 2014 +0200

    An abort on the reply is not usually a password error.
    
    Copy the code from HTTPCredidentials
---
 src/creds/tokencredentials.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/creds/tokencredentials.cpp b/src/creds/tokencredentials.cpp
index 0804cc5..4328811 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();
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list