rpms/kdenetwork/F-10 kdenetwork-4.1.3-handle-enc-message.patch, NONE, 1.1 kdenetwork.spec, 1.158, 1.159

Jaroslav Reznik jreznik at fedoraproject.org
Thu Dec 11 12:43:11 UTC 2008


Author: jreznik

Update of /cvs/pkgs/rpms/kdenetwork/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv12405

Modified Files:
	kdenetwork.spec 
Added Files:
	kdenetwork-4.1.3-handle-enc-message.patch 
Log Message:
fix kopete jabber protocol encrypted message handling (#473412)


kdenetwork-4.1.3-handle-enc-message.patch:

--- NEW FILE kdenetwork-4.1.3-handle-enc-message.patch ---
diff -up kdenetwork-4.1.3/kopete/protocols/jabber/jabbercontact.cpp.handle-enc-message kdenetwork-4.1.3/kopete/protocols/jabber/jabbercontact.cpp
--- kdenetwork-4.1.3/kopete/protocols/jabber/jabbercontact.cpp.handle-enc-message	2008-10-30 14:23:50.000000000 +0100
+++ kdenetwork-4.1.3/kopete/protocols/jabber/jabbercontact.cpp	2008-12-08 14:20:09.000000000 +0100
@@ -50,6 +50,7 @@
 #include "kopetechatsessionmanager.h"
 #include "kopeteaccountmanager.h"
 #include "kopetemetacontact.h"
+#include "kopetepluginmanager.h"
 #include "jabberprotocol.h"
 #include "jabberaccount.h"
 #include "jabberclient.h"
@@ -379,9 +380,15 @@ void JabberContact::handleIncomingMessag
 		QString body = message.body ();
 		if( !message.xencrypted().isEmpty() )
 		{
-			body = QString ("-----BEGIN PGP MESSAGE-----\n\n") + message.xencrypted () + QString ("\n-----END PGP MESSAGE-----\n");
+			kDebug ( JABBER_DEBUG_GLOBAL ) << "Received encrypted message";
+			if (Kopete::PluginManager::self()->plugin("kopete_cryptography"))
+			{
+				kDebug( JABBER_DEBUG_GLOBAL ) << "Kopete cryptography plugin loaded";
+				body = QString ("-----BEGIN PGP MESSAGE-----\n\n") + message.xencrypted () + QString ("\n-----END PGP MESSAGE-----\n");
+			}
 		}
-		else if( message.containsHTML() )
+
+		if( message.containsHTML() )
 		{
 			kDebug ( JABBER_DEBUG_GLOBAL ) << "Received a xHTML message";
 			newMessage = new Kopete::Message ( this, contactList );
diff -up kdenetwork-4.1.3/kopete/protocols/jabber/jabbergroupcontact.cpp.handle-enc-message kdenetwork-4.1.3/kopete/protocols/jabber/jabbergroupcontact.cpp
--- kdenetwork-4.1.3/kopete/protocols/jabber/jabbergroupcontact.cpp.handle-enc-message	2008-10-30 14:23:50.000000000 +0100
+++ kdenetwork-4.1.3/kopete/protocols/jabber/jabbergroupcontact.cpp	2008-12-09 14:38:09.000000000 +0100
@@ -32,6 +32,7 @@
 #include "jabbergroupmembercontact.h"
 #include "jabbercontactpool.h"
 #include "kopetemetacontact.h"
+#include "kopetepluginmanager.h"
 #include "xmpp_tasks.h"
 
 /**
@@ -181,7 +182,11 @@ void JabberGroupContact::handleIncomingM
 
 		if( !message.xencrypted().isEmpty () )
 		{
-			body = QString ("-----BEGIN PGP MESSAGE-----\n\n") + message.xencrypted () + QString ("\n-----END PGP MESSAGE-----\n");
+			if (Kopete::PluginManager::self()->plugin("kopete_cryptography"))
+			{
+				kDebug( JABBER_DEBUG_GLOBAL ) << "Kopete cryptography plugin loaded";
+				body = QString ("-----BEGIN PGP MESSAGE-----\n\n") + message.xencrypted () + QString ("\n-----END PGP MESSAGE-----\n");
+			}
 		}
 
 		// locate the originating contact
diff -up kdenetwork-4.1.3/kopete/protocols/jabber/jabbergroupmembercontact.cpp.handle-enc-message kdenetwork-4.1.3/kopete/protocols/jabber/jabbergroupmembercontact.cpp
--- kdenetwork-4.1.3/kopete/protocols/jabber/jabbergroupmembercontact.cpp.handle-enc-message	2008-10-30 14:23:50.000000000 +0100
+++ kdenetwork-4.1.3/kopete/protocols/jabber/jabbergroupmembercontact.cpp	2008-12-09 14:38:24.000000000 +0100
@@ -27,6 +27,7 @@
 #include "jabberchatsession.h"
 #include "jabbercontactpool.h"
 #include "kopetemetacontact.h"
+#include "kopetepluginmanager.h"
 
 /**
  * JabberGroupMemberContact constructor
@@ -131,7 +132,11 @@ void JabberGroupMemberContact::handleInc
 
 		if( !message.xencrypted().isEmpty () )
 		{
-			body = QString ("-----BEGIN PGP MESSAGE-----\n\n") + message.xencrypted () + QString ("\n-----END PGP MESSAGE-----\n");
+			if (Kopete::PluginManager::self()->plugin("kopete_cryptography"))
+			{
+				kDebug( JABBER_DEBUG_GLOBAL ) << "Kopete cryptography plugin loaded";
+				body = QString ("-----BEGIN PGP MESSAGE-----\n\n") + message.xencrypted () + QString ("\n-----END PGP MESSAGE-----\n");
+			}
 		}
 
 		// convert XMPP::Message into Kopete::Message


Index: kdenetwork.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kdenetwork/F-10/kdenetwork.spec,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -r1.158 -r1.159
--- kdenetwork.spec	12 Nov 2008 00:09:25 -0000	1.158
+++ kdenetwork.spec	11 Dec 2008 12:42:40 -0000	1.159
@@ -5,12 +5,13 @@
 Name: kdenetwork
 Epoch: 7
 Version: 4.1.3
-Release: 1%{?dist}
+Release: 2%{?dist}
 
 License: GPLv2
 Group: Applications/Internet
 URL: http://www.kde.org
 Source0: ftp://ftp.kde.org/pub/kde/stable/%{version}/src/%{name}-%{version}.tar.bz2
+Patch0: kdenetwork-4.1.3-handle-enc-message.patch
 
 # upstream patches
 
@@ -90,6 +91,7 @@
 
 %prep
 %setup -q
+%patch0 -p1 -b .handle-enc-message
 
 %build
 mkdir -p %{_target_platform}
@@ -164,6 +166,9 @@
 
 
 %changelog
+* Wed Dec 10 2008 Jaroslav Reznik <jreznik at redhat.com> 4.1.3-2
+- fix kopete jabber protocol encrypted message handling (#473412)
+
 * Wed Nov 12 2008 Than Ngo <than at redhat.com> 4.1.3-1
 - 4.1.3
 




More information about the fedora-extras-commits mailing list