Merge lp:~mardy/signon-ui/http-warning into lp:signon-ui

Proposed by Alberto Mardegan
Status: Merged
Approved by: Ken VanDine
Approved revision: 109
Merged at revision: 106
Proposed branch: lp:~mardy/signon-ui/http-warning
Merge into: lp:signon-ui
Diff against target: 339 lines (+164/-6)
9 files modified
.bzrignore (+4/-1)
debian/changelog (+7/-0)
debian/rules (+2/-1)
src/browser-request.cpp (+20/-3)
src/http-warning.cpp (+74/-0)
src/http-warning.h (+40/-0)
src/http-warning.qrc (+5/-0)
src/signon-ui.pro (+10/-1)
tests/unit/tst_signon_ui.pro (+2/-0)
To merge this branch: bzr merge lp:~mardy/signon-ui/http-warning
Reviewer Review Type Date Requested Status
Ken VanDine Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+169767@code.launchpad.net

Commit message

Show a worning message when authenticating with plain HTTP

Description of the change

Show a worning message when authenticating with plain HTTP

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:107
http://jenkins.qa.ubuntu.com/job/signon-ui-ci/25/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/signon-ui-saucy-amd64-ci/5

Click here to trigger a rebuild:
http://s-jenkins:8080/job/signon-ui-ci/25/rebuild

review: Approve (continuous-integration)
lp:~mardy/signon-ui/http-warning updated
108. By Alberto Mardegan

Use 16px icon

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:108
http://jenkins.qa.ubuntu.com/job/signon-ui-ci/26/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/signon-ui-saucy-amd64-ci/6

Click here to trigger a rebuild:
http://s-jenkins:8080/job/signon-ui-ci/26/rebuild

review: Approve (continuous-integration)
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Please fix the conflicts

review: Needs Fixing
lp:~mardy/signon-ui/http-warning updated
109. By Alberto Mardegan

Fix changelog conflicts

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:109
http://jenkins.qa.ubuntu.com/job/signon-ui-ci/27/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/signon-ui-saucy-amd64-ci/7

Click here to trigger a rebuild:
http://s-jenkins:8080/job/signon-ui-ci/27/rebuild

review: Approve (continuous-integration)
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.bzrignore'
--- .bzrignore 2013-06-10 11:04:32 +0000
+++ .bzrignore 2013-06-18 07:09:27 +0000
@@ -1,9 +1,11 @@
1*.a1*.a
2*.log
2*.o3*.o
3*.moc4*.moc
4*.pyc5*.pyc
5*.so6*.so
6*.so.*7*.so.*
8*.substvars
7*.tar.*9*.tar.*
8*~10*~
9.*.swp11.*.swp
@@ -11,7 +13,8 @@
11.obj13.obj
12builddir14builddir
13core15core
14debian/16/debian/files
17/debian/signon-ui
15Makefile18Makefile
16Makefile.*19Makefile.*
17moc_*20moc_*
1821
=== modified file 'debian/changelog'
--- debian/changelog 2013-06-12 04:31:58 +0000
+++ debian/changelog 2013-06-18 07:09:27 +0000
@@ -1,3 +1,10 @@
1signon-ui (0.15daily13.06.12-0ubuntu2) UNRELEASED; urgency=low
2
3 * Show a warning message when authenticating with plain
4 HTTP. (LP: #1180297).
5
6 -- Alberto Mardegan <alberto.mardegan@canonical.com> Tue, 18 Jun 2013 00:06:32 -0700
7
1signon-ui (0.15daily13.06.12-0ubuntu1) saucy; urgency=low8signon-ui (0.15daily13.06.12-0ubuntu1) saucy; urgency=low
29
3 [ Alberto Mardegan ]10 [ Alberto Mardegan ]
411
=== modified file 'debian/rules'
--- debian/rules 2013-05-02 19:17:06 +0000
+++ debian/rules 2013-06-18 07:09:27 +0000
@@ -7,7 +7,8 @@
77
8override_dh_auto_configure:8override_dh_auto_configure:
9 dh_auto_configure -- "CONFIG+=force-foreign-qwindow" \9 dh_auto_configure -- "CONFIG+=force-foreign-qwindow" \
10 "CONFIG+=use-webkit2"10 "CONFIG+=use-webkit2" \
11 "HTTP_WARNING_HELP=help:web-credentials/http-warning"
1112
12override_dh_install:13override_dh_install:
13 rm -f debian/*/usr/bin/signon-ui-unittest14 rm -f debian/*/usr/bin/signon-ui-unittest
1415
=== modified file 'src/browser-request.cpp'
--- src/browser-request.cpp 2013-06-06 13:01:21 +0000
+++ src/browser-request.cpp 2013-06-18 07:09:27 +0000
@@ -24,14 +24,17 @@
24#include "cookie-jar-manager.h"24#include "cookie-jar-manager.h"
25#include "debug.h"25#include "debug.h"
26#include "dialog.h"26#include "dialog.h"
27#include "http-warning.h"
27#include "i18n.h"28#include "i18n.h"
2829
29#include <QDBusArgument>30#include <QDBusArgument>
30#include <QDesktopServices>31#include <QDesktopServices>
32#include <QIcon>
31#include <QLabel>33#include <QLabel>
32#include <QNetworkCookie>34#include <QNetworkCookie>
33#include <QNetworkReply>35#include <QNetworkReply>
34#include <QNetworkRequest>36#include <QNetworkRequest>
37#include <QPixmap>
35#include <QPointer>38#include <QPointer>
36#include <QProgressBar>39#include <QProgressBar>
37#include <QPushButton>40#include <QPushButton>
@@ -39,6 +42,7 @@
39#include <QSettings>42#include <QSettings>
40#include <QSslError>43#include <QSslError>
41#include <QStackedLayout>44#include <QStackedLayout>
45#include <QStatusBar>
42#include <QTimer>46#include <QTimer>
43#include <QVBoxLayout>47#include <QVBoxLayout>
44#include <QWebElement>48#include <QWebElement>
@@ -276,6 +280,7 @@
276 QStackedLayout *m_webViewLayout;280 QStackedLayout *m_webViewLayout;
277 WebView *m_webView;281 WebView *m_webView;
278 AnimationLabel *m_animationLabel;282 AnimationLabel *m_animationLabel;
283 HttpWarning *m_httpWarning;
279 QUrl finalUrl;284 QUrl finalUrl;
280 QUrl responseUrl;285 QUrl responseUrl;
281 QString m_host;286 QString m_host;
@@ -299,6 +304,7 @@
299 m_webViewLayout(0),304 m_webViewLayout(0),
300 m_webView(0),305 m_webView(0),
301 m_animationLabel(0),306 m_animationLabel(0),
307 m_httpWarning(0),
302 m_settings(0),308 m_settings(0),
303 m_loginCount(0),309 m_loginCount(0),
304 m_ignoreSslErrors(false)310 m_ignoreSslErrors(false)
@@ -343,6 +349,7 @@
343 }349 }
344350
345 setupViewForUrl(url);351 setupViewForUrl(url);
352 m_httpWarning->setVisible(url.scheme() == "http");
346}353}
347354
348void BrowserRequestPrivate::onLoadProgress()355void BrowserRequestPrivate::onLoadProgress()
@@ -428,13 +435,13 @@
428void BrowserRequestPrivate::startProgress()435void BrowserRequestPrivate::startProgress()
429{436{
430 m_animationLabel->start();437 m_animationLabel->start();
431 m_webViewLayout->setCurrentWidget(m_animationLabel);438 m_webViewLayout->setCurrentIndex(1);
432}439}
433440
434void BrowserRequestPrivate::stopProgress()441void BrowserRequestPrivate::stopProgress()
435{442{
436 m_animationLabel->stop();443 m_animationLabel->stop();
437 m_webViewLayout->setCurrentWidget(m_webView);444 m_webViewLayout->setCurrentIndex(0);
438}445}
439446
440QWidget *BrowserRequestPrivate::buildWebViewPage(const QVariantMap &params)447QWidget *BrowserRequestPrivate::buildWebViewPage(const QVariantMap &params)
@@ -489,7 +496,17 @@
489 this, SLOT(onLoadProgress()));496 this, SLOT(onLoadProgress()));
490 QObject::connect(m_webView, SIGNAL(loadFinished(bool)),497 QObject::connect(m_webView, SIGNAL(loadFinished(bool)),
491 this, SLOT(onLoadFinished(bool)));498 this, SLOT(onLoadFinished(bool)));
492 m_webViewLayout->addWidget(m_webView);499 QWidget *webViewContainer = new QWidget;
500 QVBoxLayout *vLayout = new QVBoxLayout;
501 vLayout->setSpacing(0);
502 webViewContainer->setLayout(vLayout);
503 vLayout->addWidget(m_webView);
504
505 m_httpWarning = new HttpWarning;
506 m_httpWarning->setVisible(false);
507 vLayout->addWidget(m_httpWarning);
508
509 m_webViewLayout->addWidget(webViewContainer);
493510
494 m_animationLabel = new AnimationLabel(":/spinner-26.gif", 0);511 m_animationLabel = new AnimationLabel(":/spinner-26.gif", 0);
495 QObject::connect(m_webView, SIGNAL(loadStarted()),512 QObject::connect(m_webView, SIGNAL(loadStarted()),
496513
=== added file 'src/http-warning.cpp'
--- src/http-warning.cpp 1970-01-01 00:00:00 +0000
+++ src/http-warning.cpp 2013-06-18 07:09:27 +0000
@@ -0,0 +1,74 @@
1/*
2 * This file is part of signon-ui
3 *
4 * Copyright (C) 2013 Canonical Ltd.
5 *
6 * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
7 *
8 * This program is free software: you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License version 3, as published
10 * by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranties of
14 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#include "http-warning.h"
22
23#include "debug.h"
24#include "i18n.h"
25
26#include <QFile>
27#include <QLabel>
28#include <QPixmap>
29#include <QHBoxLayout>
30#include <QVBoxLayout>
31
32using namespace SignOnUi;
33
34HttpWarning::HttpWarning(QWidget *parent):
35 QWidget(parent)
36{
37 QVBoxLayout *vLayout = new QVBoxLayout;
38 vLayout->setContentsMargins(0, 0, 0, 0);
39 setLayout(vLayout);
40
41 QFrame *separator = new QFrame;
42 separator->setFrameShape(QFrame::HLine);
43 separator->setFrameShadow(QFrame::Raised);
44 separator->setContentsMargins(0, 0, 0, 0);
45 vLayout->addWidget(separator);
46
47 QWidget *labels = new QWidget;
48 vLayout->addWidget(labels);
49
50 QHBoxLayout *labelsLayout = new QHBoxLayout;
51 labelsLayout->setContentsMargins(0, 0, 0, 0);
52 labels->setLayout(labelsLayout);
53
54 QLabel *label = new QLabel;
55 label->setPixmap(QPixmap(":security-low.png"));
56 labelsLayout->addWidget(label);
57
58 label = new QLabel;
59 label->setTextFormat(Qt::RichText);
60 QString text = _("This site uses an insecure connection.");
61#ifdef HTTP_WARNING_HELP
62 text.append(QString(" <a href=\"" HTTP_WARNING_HELP "\">%1</a>").
63 arg(_("What does this mean?")));
64#endif
65 label->setText(text);
66 label->setOpenExternalLinks(true);
67 labelsLayout->addWidget(label);
68
69 labelsLayout->addStretch();
70}
71
72HttpWarning::~HttpWarning()
73{
74}
075
=== added file 'src/http-warning.h'
--- src/http-warning.h 1970-01-01 00:00:00 +0000
+++ src/http-warning.h 2013-06-18 07:09:27 +0000
@@ -0,0 +1,40 @@
1/*
2 * This file is part of signon-ui
3 *
4 * Copyright (C) 2013 Canonical Ltd.
5 *
6 * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
7 *
8 * This program is free software: you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License version 3, as published
10 * by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranties of
14 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef SIGNON_UI_HTTP_WARNING_H
22#define SIGNON_UI_HTTP_WARNING_H
23
24#include <QString>
25#include <QWidget>
26
27namespace SignOnUi {
28
29class HttpWarning: public QWidget
30{
31 Q_OBJECT
32
33public:
34 HttpWarning(QWidget *parent = 0);
35 ~HttpWarning();
36};
37
38} // namespace
39
40#endif // SIGNON_UI_HTTP_WARNING_H
041
=== added file 'src/http-warning.qrc'
--- src/http-warning.qrc 1970-01-01 00:00:00 +0000
+++ src/http-warning.qrc 2013-06-18 07:09:27 +0000
@@ -0,0 +1,5 @@
1<RCC>
2 <qresource prefix="/" >
3 <file>security-low.png</file>
4 </qresource>
5</RCC>
06
=== added file 'src/security-low.png'
1Binary files src/security-low.png 1970-01-01 00:00:00 +0000 and src/security-low.png 2013-06-18 07:09:27 +0000 differ7Binary files src/security-low.png 1970-01-01 00:00:00 +0000 and src/security-low.png 2013-06-18 07:09:27 +0000 differ
=== modified file 'src/signon-ui.pro'
--- src/signon-ui.pro 2013-06-10 11:04:32 +0000
+++ src/signon-ui.pro 2013-06-18 07:09:27 +0000
@@ -47,6 +47,7 @@
47 dialog-request.h \47 dialog-request.h \
48 dialog.h \48 dialog.h \
49 errors.h \49 errors.h \
50 http-warning.h \
50 i18n.h \51 i18n.h \
51 inactivity-timer.h \52 inactivity-timer.h \
52 indicator-service.h \53 indicator-service.h \
@@ -63,6 +64,7 @@
63 debug.cpp \64 debug.cpp \
64 dialog-request.cpp \65 dialog-request.cpp \
65 dialog.cpp \66 dialog.cpp \
67 http-warning.cpp \
66 i18n.cpp \68 i18n.cpp \
67 inactivity-timer.cpp \69 inactivity-timer.cpp \
68 indicator-service.cpp \70 indicator-service.cpp \
@@ -94,7 +96,9 @@
94 REMOTE_PROCESS_PATH=\\\"$${INSTALL_PREFIX}/libexec/signon-ui\\\" \96 REMOTE_PROCESS_PATH=\\\"$${INSTALL_PREFIX}/libexec/signon-ui\\\" \
95 I18N_DOMAIN=\\\"$${I18N_DOMAIN}\\\"97 I18N_DOMAIN=\\\"$${I18N_DOMAIN}\\\"
9698
97RESOURCES += animationlabel.qrc99RESOURCES += \
100 animationlabel.qrc \
101 http-warning.qrc
98102
99SIGNONUI_DBUS_ADAPTORS += \103SIGNONUI_DBUS_ADAPTORS += \
100 com.canonical.indicators.webcredentials.xml104 com.canonical.indicators.webcredentials.xml
@@ -119,3 +123,8 @@
119 com.canonical.indicators.webcredentials.service \123 com.canonical.indicators.webcredentials.service \
120 com.nokia.singlesignonui.service124 com.nokia.singlesignonui.service
121INSTALLS += service125INSTALLS += service
126
127# Help file for HTTP authentication warning
128!isEmpty(HTTP_WARNING_HELP) {
129 DEFINES += HTTP_WARNING_HELP=\\\"$${HTTP_WARNING_HELP}\\\"
130}
122131
=== modified file 'tests/unit/tst_signon_ui.pro'
--- tests/unit/tst_signon_ui.pro 2013-04-22 06:53:35 +0000
+++ tests/unit/tst_signon_ui.pro 2013-06-18 07:09:27 +0000
@@ -45,6 +45,7 @@
45 $$TOP_SRC_DIR/src/debug.cpp \45 $$TOP_SRC_DIR/src/debug.cpp \
46 $$TOP_SRC_DIR/src/dialog-request.cpp \46 $$TOP_SRC_DIR/src/dialog-request.cpp \
47 $$TOP_SRC_DIR/src/dialog.cpp \47 $$TOP_SRC_DIR/src/dialog.cpp \
48 $$TOP_SRC_DIR/src/http-warning.cpp \
48 $$TOP_SRC_DIR/src/i18n.cpp \49 $$TOP_SRC_DIR/src/i18n.cpp \
49 $$TOP_SRC_DIR/src/indicator-service.cpp \50 $$TOP_SRC_DIR/src/indicator-service.cpp \
50 $$TOP_SRC_DIR/src/network-access-manager.cpp \51 $$TOP_SRC_DIR/src/network-access-manager.cpp \
@@ -61,6 +62,7 @@
61 $$TOP_SRC_DIR/src/cookie-jar-manager.h \62 $$TOP_SRC_DIR/src/cookie-jar-manager.h \
62 $$TOP_SRC_DIR/src/dialog-request.h \63 $$TOP_SRC_DIR/src/dialog-request.h \
63 $$TOP_SRC_DIR/src/dialog.h \64 $$TOP_SRC_DIR/src/dialog.h \
65 $$TOP_SRC_DIR/src/http-warning.h \
64 $$TOP_SRC_DIR/src/indicator-service.h \66 $$TOP_SRC_DIR/src/indicator-service.h \
65 $$TOP_SRC_DIR/src/network-access-manager.h \67 $$TOP_SRC_DIR/src/network-access-manager.h \
66 $$TOP_SRC_DIR/src/reauthenticator.h \68 $$TOP_SRC_DIR/src/reauthenticator.h \

Subscribers

People subscribed via source and target branches

to all changes: