Bug 74481

Summary: IRC server password is ignored
Product: [Unmaintained] kopete Reporter: Christian Borss <c.borss>
Component: IRC PluginAssignee: Kopete Developers <kopete-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 0.8.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Christian Borss 2004-02-07 17:41:36 UTC
Version:           0.8.0 (using KDE KDE 3.2.0)
Installed from:    Compiled From Sources
Compiler:          gcc version 2.95.4 20011002 (Debian prerelease) 
OS:          Linux

Component: IRC plugin

I'm using an IRC bouncer and have to use a password to connect to it. But the password I entered in the IRC plugin configuration and which is stored encrypted in ~/.kde/share/config/kopeterc (I don't use kwallet) is not used when kopete is connecting to my server. If I replace

	if (!(password()).isEmpty()) {
		writeMessage("PASS", QStringList(password()) , m_Realname, false);
	}

in KIRC::slotConnected() by

	writeMessage("PASS", QString::fromLatin1("MYPASS") , m_Realname, false);

it works (I know it's an ugly hack).
So (password()).isEmpty() seems to return a wrong value.


regards,
Christian

P.S.: I could give some more infos if I could debug kopete. But kopete exits with exit code 0377 if I start it within kdbg or ddd. How do I debug kopete?
Comment 1 Martijn Klingens 2004-02-07 18:04:29 UTC
Subject: Re: [Kopete-devel]  New: IRC server password is ignored

On Saturday 07 February 2004 17:41, Christian Borss wrote:
> P.S.: I could give some more infos if I could debug kopete. But kopete
> exits with exit code 0377 if I start it within kdbg or ddd. How do I debug
> kopete?

Run 'kopete --nofork' ('run --nofork' in gdb) to avoid the forking of 
KUniqueApplications.

Comment 2 Christian Borss 2004-02-07 19:27:46 UTC
The password I entered in the IRC plugin configuration is used after restarting kopete. The password is not used directly after entering it.
Comment 3 Jason Keirstead 2004-02-08 17:06:46 UTC
From the description this sounds like it may not be an IRC issue and may be related to all those password / kwallet problems in libkopete.
Comment 4 Richard Smith 2004-02-12 03:34:47 UTC
Try replacing

if (!(password()).isEmpty()) { 
 writeMessage("PASS", QStringList(password()), m_Realname, false); 
} 
 
in KIRC::slotConnected() with

if (!password().isEmpty()) { 
 writeMessage("PASS", password(), m_Realname, false);
}

These two should be equivalent, but I'd be interested to see if they're not.
Comment 5 Jason Keirstead 2004-02-12 04:31:19 UTC
I can assure you they're equivalent.

This is not an IRC issue, it is a libkopete issue.

It's the same bug as all those other password bugs.
Comment 6 Matt Rogers 2004-02-12 05:06:42 UTC
Did you even test? 

From my POV, if writing the code one way causes it to work, but it doesn't the other, then there's something wrong there. Not to mention that the cast from a QString to a QStringList in slotConnected() seems pointless, since there's a writeMessage(const QString&, const QString&, const QString&, bool)
along with a writeMessage(const QString&, const QStringList&, const QString&, bool)


Comment 7 Jason Keirstead 2004-02-12 13:17:58 UTC
I highly doubt this is the problem because a) Both code paths go to the same place, and b) This code wroked fine for me in the past, and has not been changed since in 3.2. However, the password handling in libkopete *was* changed, and since that had a *huge ream* of bug reports relating to passwords not being saved properly in 3.2... well, put two and two together.

But, this code has all been removed in HEAD. I really need to check out an old 3.2 branch to *be *sure* I guess.
Comment 8 Jason Keirstead 2004-03-02 03:05:24 UTC
Can anyone confirm this bug still exists after the fixes to KWallet stuff?
Comment 9 Jason Keirstead 2004-03-16 20:28:29 UTC
This bug appears to be dead, since no one can confirm it exists.
Comment 10 Marc Collin 2007-06-08 23:41:50 UTC
i have this bug with kwallet

to reproduce it, create you an account on freenode (username, password)
kwallet need to be enable

exit kopete

restart it
try to go on an irc channel you need a password... like #java

i'm not able to connect

if i erase the password in kopete for irc, retype it and try to reconnect, that work fine