[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdenetwork/kopete/libkopete
From: Will Stephenson <wstephenson () kde ! org>
Date: 2007-05-17 6:53:22
Message-ID: 1179384802.939295.21278.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 665563 by wstephens:
When operating in insecure password storage mode, replace buggy kmail password code \
with KStringHandler::obscure()
M +3 -18 kopetepassword.cpp
--- branches/KDE/3.5/kdenetwork/kopete/libkopete/kopetepassword.cpp #665562:665563
@@ -35,23 +35,8 @@
#include <kmessagebox.h>
#include <kiconloader.h>
#include <kpassdlg.h>
+#include <kstringhandler.h>
-/**
- * Function for symmetrically (en/de)crypting strings for config file,
- * taken from KMail.
- *
- * @author Stefan Taferner <taferner@alpin.or.at>
- */
-static QString cryptStr( const QString &aStr )
-{
- //Once Kopete depends on 3.2 just remove this function and use \
KStringHandler::obscure
- QString result;
- for ( uint i = 0; i < aStr.length(); i++ )
- result += ( aStr[ i ].unicode() < 0x20) ? aStr[ i ] : QChar( 0x1001F - aStr[ i \
].unicode() );
-
- return result;
-}
-
class Kopete::Password::Private
{
public:
@@ -402,7 +387,7 @@
if ( passwordCrypted.isNull() )
d->passwordFromKConfig = QString::null;
else
- d->passwordFromKConfig = cryptStr( passwordCrypted );
+ d->passwordFromKConfig = KStringHandler::obscure( passwordCrypted );
d->remembered = config->readBoolEntry( "RememberPassword", false );
d->isWrong = config->readBoolEntry( "PasswordIsWrong", false );
@@ -425,7 +410,7 @@
config->setGroup( d->configGroup );
if ( d->remembered && !d->passwordFromKConfig.isNull() )
- config->writeEntry( "Password", cryptStr( d->passwordFromKConfig ) );
+ config->writeEntry( "Password", KStringHandler::obscure( d->passwordFromKConfig ) \
); else
config->deleteEntry( "Password" );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic