From f6a79a3f5989efc8db63af942851c56f0c462bb1 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 26 Feb 2012 23:15:00 +0000 Subject: Sun Feb 26 23:15:00 UTC 2012 --- extra/psi/PKGBUILD | 17 +- extra/psi/affiliationlistconfigmuc.patch | 92 +++++++++++ extra/psi/configureroomcrash.patch | 40 +++++ extra/psi/gcc-47.patch | 10 ++ extra/psi/input-validation.patch | 257 +++++++++++++++++++++++++++++++ 5 files changed, 412 insertions(+), 4 deletions(-) create mode 100644 extra/psi/affiliationlistconfigmuc.patch create mode 100644 extra/psi/configureroomcrash.patch create mode 100644 extra/psi/gcc-47.patch create mode 100644 extra/psi/input-validation.patch (limited to 'extra/psi') diff --git a/extra/psi/PKGBUILD b/extra/psi/PKGBUILD index d8769aed9..36542f8d2 100644 --- a/extra/psi/PKGBUILD +++ b/extra/psi/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 137579 2011-09-09 21:39:09Z pierre $ +# $Id: PKGBUILD 151383 2012-02-25 23:49:47Z pierre $ # Maintainer: Pierre Schmitz pkgname=psi pkgver=0.14 -pkgrel=5 +pkgrel=6 pkgdesc='Instant messaging application designed for the Jabber IM' url='http://psi-im.org/' license=('GPL') @@ -11,13 +11,22 @@ arch=('i686' 'x86_64') depends=('qca-ossl' 'qca-gnupg' 'enchant' 'libxss' 'xdg-utils') install='psi.install' source=("http://downloads.sourceforge.net/psi/psi-${pkgver}.tar.bz2" - 'archlinux.patch') + 'archlinux.patch' 'affiliationlistconfigmuc.patch' + 'configureroomcrash.patch' 'gcc-47.patch' 'input-validation.patch') md5sums=('9d7dcce3bcab53b741a712199bd986be' - 'a965c6a4ad1028f14a5897c3f5088ae8') + 'a965c6a4ad1028f14a5897c3f5088ae8' + '28258c884a0a6f2cbb297435a144ae04' + '8291eee7110a8aa8163c2e2e38c6d491' + 'd7acbb7b81671339d490622c74082d11' + '259cf255ca2d2395840a25799056a58b') build() { cd ${srcdir}/psi-${pkgver} patch -p1 -i ${srcdir}/archlinux.patch + patch -p1 -i ${srcdir}/affiliationlistconfigmuc.patch + patch -p1 -i ${srcdir}/configureroomcrash.patch + patch -p0 -i ${srcdir}/gcc-47.patch + patch -p0 -i ${srcdir}/input-validation.patch ./configure --prefix=/usr --disable-bundled-qca --release --no-separate-debug-info make } diff --git a/extra/psi/affiliationlistconfigmuc.patch b/extra/psi/affiliationlistconfigmuc.patch new file mode 100644 index 000000000..dd9119e78 --- /dev/null +++ b/extra/psi/affiliationlistconfigmuc.patch @@ -0,0 +1,92 @@ +commit ef1df7a42e7aa7b6bfb1dca5b86b303f71739fc4 +Author: Rion +Date: Fri Dec 3 16:39:56 2010 +0500 + + Fixed changing affiliations list from muc config dialog + +diff --git a/src/mucaffiliationsview.cpp b/src/mucaffiliationsview.cpp +index 8632c43..94adcec 100644 +--- a/src/mucaffiliationsview.cpp ++++ b/src/mucaffiliationsview.cpp +@@ -33,30 +33,6 @@ MUCAffiliationsView::MUCAffiliationsView(QWidget* parent) : QTreeView(parent) + setDropIndicatorShown(true); + } + +-bool MUCAffiliationsView::addToCurrent(const QString& j) +-{ +- QModelIndex index = currentIndex(); +- if (!index.isValid()) +- return false; +- +- if (index.parent().isValid()) +- index = index.parent(); +- +- if (!index.parent().isValid()) { +- XMPP::Jid jid(j); +- if (!jid.isValid()) +- return false; +- +- // TODO: Check if the user is already in the list +- +- int row = model()->rowCount(index); +- model()->insertRows(row,1,index); +- model()->setData(model()->index(row,0,index),QVariant(jid.bare())); +- return true; +- } +- return false; +-} +- + void MUCAffiliationsView::removeCurrent() + { + QModelIndex index = currentIndex(); +diff --git a/src/mucaffiliationsview.h b/src/mucaffiliationsview.h +index 11f1446..54ee0ff 100644 +--- a/src/mucaffiliationsview.h ++++ b/src/mucaffiliationsview.h +@@ -32,7 +32,6 @@ public: + + public slots: + void removeCurrent(); +- bool addToCurrent(const QString&); + + signals: + void addEnabled(bool); +diff --git a/src/mucconfigdlg.cpp b/src/mucconfigdlg.cpp +index a10f14e..dcf4a35 100644 +--- a/src/mucconfigdlg.cpp ++++ b/src/mucconfigdlg.cpp +@@ -158,9 +158,31 @@ void MUCConfigDlg::add() + { + bool ok; + QString text = QInputDialog::getText(this, tr("Add affiliation"), tr("Enter the JID of the user:"), QLineEdit::Normal, "", &ok); +- if (ok) { +- if (text.isEmpty() || !ui_.tv_affiliations->addToCurrent(text)) +- QMessageBox::critical(this, tr("Error"), tr("You have entered an invalid JID.")); ++ if (ok && ui_.tv_affiliations->currentIndex().isValid()) { ++ if (!text.isEmpty()) { ++ ++ QModelIndex index = affiliations_proxy_model_->mapToSource(ui_.tv_affiliations->currentIndex()); ++ ++ if (index.parent().isValid()) ++ index = index.parent(); ++ ++ if (!index.parent().isValid()) { ++ XMPP::Jid jid(text); ++ if (jid.isValid()) { ++ ++ // TODO: Check if the user is already in the list ++ ++ int row = affiliations_model_->rowCount(index); ++ affiliations_model_->insertRows(row,1,index); ++ QModelIndex newIndex = affiliations_model_->index(row,0,index); ++ affiliations_model_->setData(newIndex, QVariant(jid.bare())); ++ ui_.tv_affiliations->setCurrentIndex(affiliations_proxy_model_->mapFromSource(newIndex)); ++ return; ++ } ++ } ++ } ++ ++ QMessageBox::critical(this, tr("Error"), tr("You have entered an invalid JID.")); + } + } + diff --git a/extra/psi/configureroomcrash.patch b/extra/psi/configureroomcrash.patch new file mode 100644 index 000000000..99fa30794 --- /dev/null +++ b/extra/psi/configureroomcrash.patch @@ -0,0 +1,40 @@ +commit ec91add0e6398ad20c7a8f14a1a08c5e3282c5bd +Author: Michail Pishchagin +Date: Tue Oct 19 11:26:31 2010 +0400 + + Fix crash in MUCAffiliationsModel on Qt 4.7 (closes #1087) + Based on 1610-psi-fix-crash-in-muc-configurator.diff from Psi+ + +diff --git a/src/mucaffiliationsmodel.cpp b/src/mucaffiliationsmodel.cpp +index 722b762..fd0a830 100644 +--- a/src/mucaffiliationsmodel.cpp ++++ b/src/mucaffiliationsmodel.cpp +@@ -150,15 +150,18 @@ void MUCAffiliationsModel::resetAffiliationLists() + + void MUCAffiliationsModel::resetAffiliationList(MUCItem::Affiliation a) + { ++ emit layoutAboutToBeChanged(); + enabled_[(AffiliationListIndex) affiliationToIndex(a)] = false; + QModelIndex index = affiliationListIndex(a); + if (hasChildren(index)) { + removeRows(0,rowCount(index),index); + } ++ emit layoutChanged(); + } + + void MUCAffiliationsModel::setAffiliationListEnabled(MUCItem::Affiliation a, bool b) + { ++ emit layoutAboutToBeChanged(); + QModelIndex index = affiliationListIndex(a); + enabled_[(AffiliationListIndex) index.row()] = b; + emit layoutChanged(); +@@ -208,6 +211,9 @@ void MUCAffiliationsModel::addItems(const QList& items) + foreach(MUCItem item, items) { + QModelIndex list = affiliationListIndex(item.affiliation()); + if (list.isValid() && !item.jid().isEmpty()) { ++ if (!dirty) { ++ emit layoutAboutToBeChanged(); ++ } + int row = rowCount(list); + if (row == 0) { + enabled_[(AffiliationListIndex) list.row()] = true; diff --git a/extra/psi/gcc-47.patch b/extra/psi/gcc-47.patch new file mode 100644 index 000000000..64cb83fba --- /dev/null +++ b/extra/psi/gcc-47.patch @@ -0,0 +1,10 @@ +--- iris/src/irisnet/corelib/netinterface_unix.cpp.orig 2012-01-07 19:46:39.493999646 +0100 ++++ iris/src/irisnet/corelib/netinterface_unix.cpp 2012-01-07 19:46:57.251002321 +0100 +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + + // for solaris + #ifndef SIOCGIFCONF diff --git a/extra/psi/input-validation.patch b/extra/psi/input-validation.patch new file mode 100644 index 000000000..7260c80e1 --- /dev/null +++ b/extra/psi/input-validation.patch @@ -0,0 +1,257 @@ +commit c68fdd9926a38b2820bc5df97fd1905355a2640d +Author: rion +Date: Fri Oct 7 22:19:05 2011 +0600 + + Fixed QLabel CVE + +--- src/Certificates/CertificateDisplay.ui 2011-10-19 08:30:15 +0000 ++++ src/Certificates/CertificateDisplay.ui 2011-10-19 08:31:23 +0000 +@@ -1,105 +1,118 @@ +- ++ ++ + CertificateDisplay +- +- ++ ++ + + 0 + 0 +- 518 ++ 525 + 369 + + +- ++ + Certificate Information + +- +- ++ ++ ++ 6 ++ ++ + 11 + +- +- 6 +- + +- +- ++ ++ ++ 6 ++ ++ + 0 + +- +- 6 +- + +- +- ++ ++ ++ 6 ++ ++ + 0 + +- +- 6 +- + +- +- ++ ++ + Certificate Validation: + + + + +- +- ++ ++ + + ++ ++ Qt::PlainText ++ + + + +- +- ++ ++ + Valid From: + + + + +- +- ++ ++ + + ++ ++ Qt::PlainText ++ + + + +- +- ++ ++ + Valid Until: + + + + +- +- ++ ++ + + ++ ++ Qt::PlainText ++ + + + +- +- ++ ++ + Serial Number: + + + + +- +- ++ ++ + + ++ ++ Qt::PlainText ++ + + + + +- ++ + Qt::Vertical + +- ++ + QSizePolicy::Expanding + +- ++ + + 20 + 106 +@@ -110,14 +123,14 @@ + + + +- +- ++ ++ + + 350 + 300 + + +- ++ + Qt::ScrollBarAlwaysOff + + +@@ -125,35 +138,35 @@ + + + +- +- ++ ++ + QFrame::HLine + +- ++ + QFrame::Sunken + +- ++ + Qt::Horizontal + + + + +- +- ++ ++ ++ 6 ++ ++ + 0 + +- +- 6 +- + + +- ++ + Qt::Horizontal + +- ++ + QSizePolicy::Expanding + +- ++ + + 421 + 20 +@@ -162,17 +175,17 @@ + + + +- +- +- Close +- +- ++ ++ ++ Close ++ ++ + + + + + +- ++ + qPixmapFromMimeSource + + tb_cert + -- cgit v1.2.3-54-g00ecf