Bug 103564

Summary: crypto doesn't work, because of incorrect \n-(0x0a-)handling
Product: [Unmaintained] kopete Reporter: Sven Wehner <mail>
Component: generalAssignee: Kopete Developers <kopete-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: NOR    
Version: 0.10   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Sven Wehner 2005-04-09 17:50:53 UTC
Version:           0.10 (using KDE KDE 3.4.0)
Installed from:    Gentoo Packages
Compiler:          gcc 3.4 
OS:                Linux

The crypto-plugin used by kopete seems to handle encrypted messages the wrong way. When I get an encrypted message, a password-prompt shows up, that will always fails. After three wrong inputs, the encrypted message appears in just one line.
The message is encrypted correct - I can copy and paste it to kgpg, add the linebreaks and decrypt with password.
If I sniff a encrypted ICQ-session, I see in messages the usage of 0x0a for \n (no \r) in both directions. 
The other can decrypt my messages correctly using sim.

Is this because of a forgotten "-e"-parameter to echo in kopete/plugins/cryptography/kgpginterface.cpp?:
[...]
-               QCString gpgcmd="echo ";
+               QCString gpgcmd="echo -e";
                gpgcmd += KShellProcess::quote(text).utf8();
                gpgcmd += " | gpg --no-secmem-warning --no-tty ";
[...]
Comment 1 Olivier Goffart 2005-04-09 18:21:24 UTC
cf  Bug 101103  

I think it has been fixed in CVS  (to be confirmed)

note that -e is the default for echo, and then useless.
or have you tryed it and did it worked ?

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