[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [ktp-text-ui] filters/bugzilla: Review comments
From: David Edmundson <kde () davidedmundson ! co ! uk>
Date: 2013-03-06 21:54:38
Message-ID: 20130306215438.6AD0EA60E4 () git ! kde ! org
[Download RAW message or body]
Git commit 8676cdc84461b568fa6f18a06abc31242ba3becd by David Edmundson.
Committed on 06/03/2013 at 22:42.
Pushed by davidedmundson into branch 'master'.
Review comments
M +6 -7 filters/bugzilla/bugzilla-filter.cpp
M +1 -1 filters/bugzilla/ktptextui_message_filter_bugzilla.desktop.cmake
http://commits.kde.org/telepathy-text-ui/8676cdc84461b568fa6f18a06abc31242ba3becd
diff --git a/filters/bugzilla/bugzilla-filter.cpp \
b/filters/bugzilla/bugzilla-filter.cpp index cfa4276..9ea9a37 100644
--- a/filters/bugzilla/bugzilla-filter.cpp
+++ b/filters/bugzilla/bugzilla-filter.cpp
@@ -31,11 +31,11 @@ class BugzillaFilter::Private
{
public:
Private() {
- filterId = 0;
+ requestCounter = 0;
}
QRegExp bugText;
- int filterId;
+ int requestCounter;
QStringList bugzillaHosts;
};
@@ -62,9 +62,10 @@ BugzillaFilter::~BugzillaFilter()
delete d;
}
-void BugzillaFilter::addBugDescription(KTp::Message &message, const KUrl &baseUrl) {
- QString bugRequestId((QLatin1String("bug_") + QString::number(d->filterId)));
- d->filterId++;
+void BugzillaFilter::addBugDescription(KTp::Message &message, const KUrl &baseUrl)
+{
+ QString bugRequestId((QLatin1String("bug_") + \
QString::number(d->requestCounter))); + d->requestCounter++;
KUrl request;
request.setHost(baseUrl.host());
@@ -112,8 +113,6 @@ void BugzillaFilter::filterMessage(KTp::Message &message, const \
KTp::MessageCont
if (url.fileName() == QLatin1String("show_bug.cgi")) { //a bugzilla of some \
sort
- //add a check on the hostname against a whitelist.
-
//as we have to use jsonp to get round making a cross-domain http \
request, a malicious website
//could pretend to be bugzilla and return arbitrary data that we cannot \
sanitise, filling the text-ui
//then someone could send a link potentially executing random JS.
diff --git a/filters/bugzilla/ktptextui_message_filter_bugzilla.desktop.cmake \
b/filters/bugzilla/ktptextui_message_filter_bugzilla.desktop.cmake index \
403ef20..2a25417 100644
--- a/filters/bugzilla/ktptextui_message_filter_bugzilla.desktop.cmake
+++ b/filters/bugzilla/ktptextui_message_filter_bugzilla.desktop.cmake
@@ -10,6 +10,6 @@ X-KDE-PluginInfo-Email=kde-telepathy@kde.org
X-KDE-PluginInfo-Name=bugzilla
X-KDE-PluginInfo-Version=@KTP_TEXT_UI_VERSION@
X-KDE-PluginInfo-Website=http://community.kde.org/KTp
-X-KDE-PluginInfo-License=GPL
+X-KDE-PluginInfo-License=LGPL
X-KDE-PluginInfo-EnabledByDefault=true
X-KTp-PluginInfo-Version=@KTP_MESSAGE_FILTER_FRAMEWORK_VERSION@
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic