[Pkg-owncloud-commits] [owncloud-client] 104/333: Do not beleive that the credidential are wrong when the job is cancelled

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Apr 17 23:16:40 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 4aaa256b114741f97f195d798ef6177eda54fbbc
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Thu Mar 6 20:31:48 2014 +0100

    Do not beleive that the credidential are wrong when the job is cancelled
    
    Otherwise, aborting the sync will make the client beleive the credidentials
    are wrong.
---
 src/creds/httpcredentials.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/creds/httpcredentials.cpp b/src/creds/httpcredentials.cpp
index 050be60..485a6af 100644
--- a/src/creds/httpcredentials.cpp
+++ b/src/creds/httpcredentials.cpp
@@ -72,6 +72,8 @@ int getauth(const char *prompt,
 }
 
 const char userC[] = "user";
+const char authenticationFailedC[] = "owncloud-authentication-failed";
+
 
 } // ns
 
@@ -225,7 +227,8 @@ bool HttpCredentials::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()));
 }
 
 void HttpCredentials::slotReadJobDone(QKeychain::Job *job)
@@ -341,6 +344,7 @@ void HttpCredentials::slotAuthentication(QNetworkReply* reply, QAuthenticator* a
     // 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