Bug 72167 - KMail doesn't convert SMTP password correctly on upgrade
Summary: KMail doesn't convert SMTP password correctly on upgrade
Status: RESOLVED DUPLICATE of bug 56319
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: SVN (3.5 branch)
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-08 17:15 UTC by Malte S. Stretz
Modified: 2007-09-14 12:17 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Malte S. Stretz 2004-01-08 17:15:06 UTC
Version:           1.5.94 (using KDE 3.1.94 (CVS >= 20031206), Gentoo)
Compiler:          gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r3, propolice)
OS:          Linux (i686) release 2.4.20-gentoo-r8

I just upgraded from KDE 3.1.4 to 3.2-beta (CVS from yesterday).

When I tried to send a mail, I got a repsonse from the server that my password (which is saved in the file) is not correct. I had to go once to
Configure->Network->Sending-><Account>->Modify
and just press "Ok" to fix this. Very weird :)
Comment 1 Ingo Klöcker 2004-01-11 22:56:36 UTC
The only thing that was changed is the following. So the guy who broke it will have to fix it.

 QString KStringHandler::obscure( const QString &str )
 {
   QString result;
+  const QChar *unicode = str.unicode();
   for ( uint i = 0; i < str.length(); ++i )
-    result += ( str.unicode()[ i ].unicode() < 0x20 ) ? str.unicode()[ i ] :
-        QChar( 0x1001F - str.unicode()[ i ] );
+    result += ( unicode[ i ].unicode() < 0x20 ) ? unicode[ i ] :
+        QChar( 0x1001F - unicode[ i ].unicode() );
 
   return result;
 }
Comment 2 Stephan Kulow 2004-01-12 10:24:09 UTC
If that change broke it, more than people updating from 3.1 would have noticed. Really, I double checked the code and I very much doubt the problem is in there.
Comment 3 Stephan Kulow 2004-01-12 10:34:57 UTC
Note that the kmail 3.1 code is this:

  for (uint i = 0; i < aStr.length(); i++)
    result += (aStr[i].unicode() < 0x20) ? aStr[i] :
      QChar(0x1001F - aStr[i].unicode());
  return result;

Comment 4 Ingo Klöcker 2004-01-12 22:17:26 UTC
I just saved the password with KMail 1.5.4, copied the kmailrc to my HEAD test user and sent a test message. Worked fine.

Malte, do you still have the old kmailrc (before the update)? If not, do you still have access to KMail 1.5.4 and can save the password with this version and with KMail HEAD? Are the saved passwords equal?
Comment 5 Malte S. Stretz 2004-01-12 23:48:24 UTC
Actually, yeah, it seems like Gentoo has a pretty genial KDEHOME handling :) I still have the old kmailrc lying around, so I did the following:

$ grep ^pass= ~/.kde3.1/share/config/kmailrc > ~/tmp/km31
$ grep ^pass= ~/.kdecvs/share/config/kmailrc > ~/tmp/km32
$ cmp ~/tmp/km3? && echo Huh?
Huh?

At this point I really had doubts about myself. So I went, backuped my 3.2 config and replaced it with the 3.1 one. And KMail gave me again:
| Sending failed:
| Authentication failed.
| Most likely the password is wrong.
| The server responded: "5.7.0 {mp026} Incorrect username or password"
| The message will stay in the 'outbox' folder until you either fix the
| problem (e.g. a broken address) or remove the message from the 'outbox'
| folder.
| The following transport protocol was used:
| GMX (Mailinglisten)

So, I'm not completely insane :) I'm currently digging deeper into this. I even tried to tcpdump the connection but it has SSL enabled. Lemme see what I'll find out...
Comment 6 Malte S. Stretz 2004-01-13 00:25:00 UTC
Now, this gets very weird. Following facts:
1. This problem is 80% reproducable if I started my kmail with the 3.1 rc.
2. It happens in about 10% the times I use an already converted rc.
3. If it has once happened, it never happens again in a session.
4. It does not happen if I modified the kmailrc before conversion and removed either TLS or CRAM-MD5
5. I'm confused.
6. I'm not sure but I don't think its a server problem as it happened the first time a week ago and is still reproducable. Also because it happens only the first time I send a mail.

The transport in question is (without password):
| [Transport 4]
| auth=true
| authtype=CRAM-MD5
| encryption=TLS
| host=mail.gmx.net
| localHostname=
| name=GMX (Mailinglisten)
| pass=xxx
| port=25
| precommand=
| specifyHostname=false
| storepass=true
| type=smtp
| user=msquadrat@gmx.net

Btw, what do you think about base64-encoding the password? All those special characters look pretty fragile when I edit the file with an editor...
Comment 7 Ingo Klöcker 2004-01-13 18:48:58 UTC
Point 4. indicates that your problem is related to #56319. CRAM-MD5 with TLS seems to be broken.


*** This bug has been marked as a duplicate of 56319 ***