[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdepim
From:       Volker Krause <vkrause () kde ! org>
Date:       2008-08-18 17:39:13
Message-ID: 1219081153.348056.21540.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 848907 by vkrause:

Merged revisions 820074-821035,821037-821124,821126-821345,821347-821370,821372-821378,821380-82 \
1648,821650,821652-821813,821815-821835,821837-822268,822270-823852,823854-823864,823866-823882,823884-824277,824279-824286 \
via svnmerge from  https://vkrause@svn.kde.org/home/kde/branches/kdepim/enterprise/kdepim

........
  r820074 | mutz | 2008-06-13 08:47:27 +0200 (Fri, 13 Jun 2008) | 3 lines
  
  Fix serialisation of DNs (missing escapting of rfc2253 'special's
  
  kolab/issue2619
........
  r824218 | mutz | 2008-06-25 11:33:54 +0200 (Wed, 25 Jun 2008) | 3 lines
  
  Properly escape the gpgsm output, QTextEdit interprets HTML.
  
  Fixes kolab/issue2618.
........
  r824286 | mutz | 2008-06-25 17:06:48 +0200 (Wed, 25 Jun 2008) | 3 lines
  
  Don't start automatic search for empty external queries.
  
  Fixes kolab/issue2740.
........


 _M            . (directory)  
 M  +6 -5      certmanager/certificateinfowidgetimpl.cpp  
 M  +2 -2      certmanager/certificatewizardimpl.cpp  
 M  +1 -1      certmanager/certmanager.cpp  
 M  +27 -1     certmanager/lib/kleo/dn.cpp  
 M  +3 -0      certmanager/lib/kleo/dn.h  


** branches/KDE/3.5/kdepim #property svnmerge-integrated
   - /branches/kdepim/enterprise/kdepim:1-767022,767033,767233-767554,767556,767558-767946,76794 \
8-769318,769320-769354,769356-771105,771107-771251,771253-772311,772313-772316,772318-775194,775 \
196-775202,775204,775207-775211,775213-778001,778003-778004,778007,778010-778011,778013-778029,7 \
78031-778727,778729-779448,779450-779482,779484-779505,779507-779852,779854-779994,780211,780250 \
-780452,780454-780495,780497,780499-780529,780531-782028,782030-783127,783129-783243,783245,7832 \
48-783477,783479-784380,784382-784426,784428-784691,784693-785478,785480-785558,787827,788634,78 \
9925,790349-790352,791184-791440,791443-792201,792203-792957,793296,794734,795745-795763,795765, \
795767-798445,798447-798448,798450-798495,798497-800070,800072-800167,800169-802138,802140-80214 \
8,802150-802151,802153-803259,803261-803299,803301-803308,803310-803380,803383-803397,803399-804 \
993,804995-805347,805349-805427,805429-805459,805461-805702,807761-809708,809710-810236,810238-810302,810304,810306-811205,811
  207-813547,813549-814372,814374,814376-816024,816026-816313,816315-816322,816324-817070,817072 \
-817087,817089-817101,817103-819076,819078-820073,820075-821035,821037-821124,821126-821378,8213 \
80-821648,821650-821835,821837-822268,822270-824217,824219-824277,824279-824285,824287-825075,82 \
5077-825083,825085-826354,826356-827612,827614-827891,827893-827944,827946-827949,827951-829033,829035-830477,830479-830875,830877-830932,830934-834241
  + /branches/kdepim/enterprise/kdepim:1-767022,767033,767233-767554,767556,767558-767946,767948 \
-769318,769320-769354,769356-771105,771107-771251,771253-772311,772313-772316,772318-775194,7751 \
96-775202,775204,775207-775211,775213-778001,778003-778004,778007,778010-778011,778013-778029,77 \
8031-778727,778729-779448,779450-779482,779484-779505,779507-779852,779854-779994,780211,780250- \
780452,780454-780495,780497,780499-780529,780531-782028,782030-783127,783129-783243,783245,78324 \
8-783477,783479-784380,784382-784426,784428-784691,784693-785478,785480-785558,787827,788634,789 \
925,790349-790352,791184-791440,791443-792201,792203-792957,793296,794734,795745-795763,795765,7 \
95767-798445,798447-798448,798450-798495,798497-800070,800072-800167,800169-802138,802140-802148 \
,802150-802151,802153-803259,803261-803299,803301-803308,803310-803380,803383-803397,803399-8049 \
93,804995-805347,805349-805427,805429-805459,805461-805702,807761-809708,809710-810236,810238-810302,810304,810306-811205,811
  207-813547,813549-814372,814374,814376-816024,816026-816313,816315-816322,816324-817070,817072 \
-817087,817089-817101,817103-819076,819078-821035,821037-821124,821126-821378,821380-821648,8216 \
50-821835,821837-822268,822270-824277,824279-825075,825077-825083,825085-826354,826356-827612,82 \
7614-827891,827893-827944,827946-827949,827951-829033,829035-830477,830479-830875,830877-830932,830934-834241
                
--- branches/KDE/3.5/kdepim/certmanager/certificateinfowidgetimpl.cpp #848906:848907
@@ -62,10 +62,11 @@
 #include <qcursor.h>
 #include <qapplication.h>
 #include <qdatetime.h>
+#include <qstylesheet.h>
+#include <qtextcodec.h>
 
 // other
 #include <assert.h>
-#include <qtextcodec.h>
 
 CertificateInfoWidgetImpl::CertificateInfoWidgetImpl( const GpgME::Key & key, bool external,
 						      QWidget * parent, const char * name )
@@ -266,7 +267,7 @@
 
   if ( !proc->start( KProcess::NotifyOnExit, (KProcess::Communication)(KProcess::Stdout | \
                KProcess::Stderr) ) ) {
     QString wmsg = i18n("Failed to execute gpgsm:\n%1").arg( i18n( "program not found" ) );
-    dumpView->setText( wmsg );
+    dumpView->setText( QStyleSheet::escape( wmsg ) );
     delete proc;
   }
 }
@@ -285,10 +286,10 @@
   int rc = ( proc->normalExit() ) ? proc->exitStatus() : -1 ;
 
   if ( rc == 0 ) {
-    dumpView->setText( QString::fromUtf8( mDumpOutput ) );
+    dumpView->setText( QStyleSheet::escape( QString::fromUtf8( mDumpOutput ) ) );
   } else {
     if ( !mDumpError.isEmpty() ) {
-      dumpView->setText( QString::fromUtf8( mDumpError ) );
+      dumpView->setText( QStyleSheet::escape( QString::fromUtf8( mDumpError ) ) );
     } else
     {
       QString wmsg = i18n("Failed to execute gpgsm:\n%1");
@@ -296,7 +297,7 @@
         wmsg = wmsg.arg( i18n( "program cannot be executed" ) );
       else
         wmsg = wmsg.arg( strerror(rc) );
-      dumpView->setText( wmsg );
+      dumpView->setText( QStyleSheet::escape( wmsg ) );
     }
   }
 
--- branches/KDE/3.5/kdepim/certmanager/certificatewizardimpl.cpp #848906:848907
@@ -230,9 +230,9 @@
 
 	  if ( const char * oid = oidForAttributeName( attr ) ) {
 		// we need to translate the attribute name for the backend:
-		rdns.push_back( QString::fromUtf8( oid ) + '=' + value );
+              rdns.push_back( QString::fromUtf8( oid ) + '=' + Kleo::DN::escape( value ) );
 	  } else {
-		rdns.push_back( attr + '=' + value );
+              rdns.push_back( attr + '=' + Kleo::DN::escape( value ) );
 	  }
     }
     certParms += rdns.join(",");
--- branches/KDE/3.5/kdepim/certmanager/certmanager.cpp #848906:848907
@@ -200,7 +200,7 @@
            SLOT( slotDropped(const KURL::List&) ) );
 
   mLineEditAction->setText(query);
-  if ( !mRemote || !query.isEmpty() )
+  if ( !mRemote && !mNextFindRemote || !query.isEmpty() )
     slotSearch();
 
   if ( !import.isEmpty() )
--- branches/KDE/3.5/kdepim/certmanager/lib/kleo/dn.cpp #848906:848907
@@ -268,12 +268,33 @@
   return parse_dn( (const unsigned char*)dn.utf8().data() );
 }
 
+static QString dn_escape( const QString & s ) {
+    QString result;
+    for ( unsigned int i = 0, end = s.length() ; i != end ; ++i ) {
+        const QChar ch = s[i];
+        switch ( ch.unicode() ) {
+        case ',':
+        case '+':
+        case '"':
+        case '\\':
+        case '<':
+        case '>':
+        case ';':
+            result += '\\';
+            // fall through
+        default:
+            result += ch;
+        }
+    }
+    return result;
+}
+
 static QString
 serialise( const QValueVector<Kleo::DN::Attribute> & dn ) {
   QStringList result;
   for ( QValueVector<Kleo::DN::Attribute>::const_iterator it = dn.begin() ; it != dn.end() ; \
++it )  if ( !(*it).name().isEmpty() && !(*it).value().isEmpty() )
-      result.push_back( (*it).name().stripWhiteSpace() + '=' + (*it).value().stripWhiteSpace() \
); +      result.push_back( (*it).name().stripWhiteSpace() + '=' + dn_escape( \
(*it).value().stripWhiteSpace() ) );  return result.join( "," );
 }
 
@@ -367,6 +388,11 @@
   return d ? serialise( d->attributes ) : QString::null ;
 }
 
+// static
+QString Kleo::DN::escape( const QString & value ) {
+    return dn_escape( value );
+}
+
 void Kleo::DN::detach() {
   if ( !d ) {
     d = new Kleo::DN::Private();
--- branches/KDE/3.5/kdepim/certmanager/lib/kleo/dn.h #848906:848907
@@ -87,6 +87,9 @@
 
     const DN & operator=( const DN & other );
 
+    /** @return the value in rfc-2253-escaped form */
+    static QString escape( const QString & value );
+
     /** @return the DN in a reordered form, according to the settings in
 	the [DN] group of the application's config file */
     QString prettyDN() const;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic