From 1960008c83fdc91cbf6241350768dc2b1b9b4595 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Fri, 12 Feb 2010 00:00:55 +0000 Subject: [PATCH] Fix Web UI authentication with Konqueror --- src/httpconnection.cpp | 1 + src/httpserver.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/httpconnection.cpp b/src/httpconnection.cpp index 9e9e92a7b..61993c2e9 100644 --- a/src/httpconnection.cpp +++ b/src/httpconnection.cpp @@ -138,6 +138,7 @@ void HttpConnection::respond() { return; } QString auth = parser.value("Authorization"); + qDebug("Auth: %s", auth.split(" ").first().toLocal8Bit().data()); if (QString::compare(auth.split(" ").first(), "Digest", Qt::CaseInsensitive) != 0 || !parent->isAuthorized(auth.toLocal8Bit(), parser.method())) { // Update failed attempt counter parent->client_failed_attempts.insert(socket->peerAddress().toString(), nb_fail+1); diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 6679da545..991152134 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -207,7 +207,7 @@ bool HttpServer::isAuthorized(QByteArray auth, QString method) const { } QByteArray prop_cnonce = regex_cnonce.cap(1).toLocal8Bit(); qDebug("prop cnonce is: %s", prop_cnonce.data()); - QRegExp regex_qop(".*qop=(\\w+).*"); + QRegExp regex_qop(".*qop=[\"]?(\\w+)[\"]?.*"); if(regex_qop.indexIn(auth) < 0) { qDebug("AUTH-PROB: missing qop"); return false;