[Pkg-owncloud-commits] [owncloud-client] 111/121: ShibbolethView: Open a debug windows that shows cipher info. (#5080)
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu Jul 28 15:32:04 UTC 2016
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 ebcec4420298155abdfd27e14bdb05d683e951e8
Author: Klaas Freitag <freitag at owncloud.com>
Date: Mon Jul 25 17:47:23 2016 +0200
ShibbolethView: Open a debug windows that shows cipher info. (#5080)
It opens a window and connects to a cipher test
page, showing the output from there, that helps for debugging.
The window is enabled by setting the environment variable
OWNCLOUD_SHIBBOLETH_DEBUG
---
src/gui/creds/shibboleth/shibbolethwebview.cpp | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/gui/creds/shibboleth/shibbolethwebview.cpp b/src/gui/creds/shibboleth/shibbolethwebview.cpp
index f98a2c3..7bc11c8 100644
--- a/src/gui/creds/shibboleth/shibbolethwebview.cpp
+++ b/src/gui/creds/shibboleth/shibbolethwebview.cpp
@@ -20,6 +20,7 @@
#include <QMessageBox>
#include <QNetworkReply>
#include <QSettings>
+#include <QMainWindow>
#include "creds/shibboleth/shibbolethwebview.h"
#include "creds/shibbolethcredentials.h"
@@ -74,10 +75,23 @@ ShibbolethWebView::ShibbolethWebView(AccountPtr account, QWidget* parent)
connect(page->networkAccessManager()->cookieJar(),
SIGNAL(newCookiesForUrl (QList<QNetworkCookie>, QUrl)),
this, SLOT(onNewCookiesForUrl (QList<QNetworkCookie>, QUrl)));
+
page->mainFrame()->load(account->url());
this->setPage(page);
setWindowTitle(tr("%1 - Authenticate").arg(Theme::instance()->appNameGUI()));
+ // Debug view to display the cipher suite
+ if( !qgetenv("OWNCLOUD_SHIBBOLETH_DEBUG").isEmpty() ) {
+ // open an additional window to display some cipher debug info
+ QWebPage *debugPage = new UserAgentWebPage(this);
+ debugPage->mainFrame()->load( QUrl("https://cc.dcsec.uni-hannover.de/"));
+ QWebView *debugView = new QWebView(this);
+ debugView->setPage(debugPage);
+ QMainWindow *window = new QMainWindow(this);
+ window->setWindowTitle(tr("SSL Chipher Debug View"));
+ window->setCentralWidget(debugView);
+ window->show();
+ }
// If we have a valid cookie, it's most likely expired. We can use this as
// as a criteria to tell the user why the browser window pops up
QNetworkCookie shibCookie = ShibbolethCredentials::findShibCookie(_account.data(), ShibbolethCredentials::accountCookies(_account.data()));
@@ -142,7 +156,6 @@ void ShibbolethWebView::slotLoadFinished(bool success)
if (!success) {
qDebug() << Q_FUNC_INFO << "Could not load Shibboleth login page to log you in.";
-
}
}
--
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