Bug 362535 - Kopete 1.9.0 somtimes won't encrypt even though the GUI says otherwise
Summary: Kopete 1.9.0 somtimes won't encrypt even though the GUI says otherwise
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Unmaintained
Component: OTR Plugin (show other bugs)
Version: Git
Platform: Neon Linux
: NOR major
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
: 274099 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-05-01 10:37 UTC by OlafLostViking
Modified: 2016-11-26 22:16 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 16.12
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description OlafLostViking 2016-05-01 10:37:13 UTC
Kopete 1.9.0 (not selectable in the dropdown) does not automatically end OTR sessions when the other side ends it or your account goes offline. There are multiple problems as a result of that.

But a quite problematic one (as you won't see it without explicetly looking for it) is that, even though I refresh the OTR session manually when the other party comes online again (including ending and starting it from scratch), my messages are not encrypted. The connection failing or so is something you can "correct" manually. But in this case Kopete claims that the encryption was successfully refreshed but is still sending the contents unencrypted (you can check in the XML console).

The only way to get an encryption working again is restarting Kopete.

Reproducible: Always
Comment 1 OlafLostViking 2016-05-01 14:45:23 UTC
Looks like Kopete is internally killing the _encryption_ on the sending side as soon as I close the chat window/tab without informing the other side of that. It can still _decrypt_ messages from the other client. I saw it first with a Pidgin contact and verified it now with a Conversations client.
Comment 2 Pali Rohár 2016-05-31 15:49:38 UTC
Michael, can you look at this bug?
Comment 3 Michael Zanetti 2016-06-01 08:31:00 UTC
(In reply to Pali Rohár from comment #2)
> Michael, can you look at this bug?

I'm sorry... I'm not really using Kopete (or any of KDE) any more... I'm afraid you're on your own with this.
Comment 4 fgerin 2016-06-11 14:44:29 UTC
Confirmed on my side too, with kopete 1.6.60 / debian jessie.

Seems very related to bug 274099 which is quite old.
Comment 5 OlafLostViking 2016-07-27 16:32:25 UTC
It didn't change in 1.9.3.

Since the dropdown in the bug report form isn't up to date either (latest is 1.7.2), I wonder if Kopete is still being maintained or if it's dead: Are there any developers left or would it be better to abandon it and switch to GTK based programs?
Comment 6 Pali Rohár 2016-07-27 16:41:00 UTC
(In reply to OlafLostViking from comment #5)
> Since the dropdown in the bug report form isn't up to date either (latest is
> 1.7.2),

Thats bugzilla configuration... and I have no idea how to change it...

> I wonder if Kopete is still being maintained or if it's dead: Are
> there any developers left

Kopete is still maintained, there are few developers around. KF5 port is work in progress, jabber library periodically updated and when I have time I also fixing some bugs... I would say it is not dead, just not heavily developed as 10 years ago.
Comment 7 OlafLostViking 2016-10-12 13:03:42 UTC
1.10.1 is still dangerous for important data.
Comment 8 Pali Rohár 2016-11-20 12:22:59 UTC
Hi! Please provide exact steps how to reproduce this bug. I tried to debug it, but I have not seen any unencreypted messages sent via Jabber protocol.
Comment 9 OlafLostViking 2016-11-21 10:30:35 UTC
Sure thing:

1. start kopete and go online

2. open XML console for the jabber account used for testing

3. send unencrypted message from another account/server/VM via KTP
3a. as expected: unencrypted message in XML console

4. initiate OTR session from the other client (KTP)
4a. Kopete and KTP show that the channel is encrypted
4b. messages sent in both directions are encrypted

===> This is the important step. Closing the window triggers the problem.
5. close chat window in kopete

6. reopen it and send message
6a. Kopete still claims that the channel is encrypted
6b. KTP correctly says the received message is unencrypted
6c. the XML console confirms this as I can read the sent message in clear text


This also "works" when using Converstations on an Android phone instead of KTP as partner.
Comment 10 Pali Rohár 2016-11-21 17:24:34 UTC
(In reply to OlafLostViking from comment #9)
> ===> This is the important step. Closing the window triggers the problem.
> 5. close chat window in kopete

Thank you very much! Without it I was not able to reprocude it.
Comment 11 Pali Rohár 2016-11-22 00:21:55 UTC
*** Bug 274099 has been marked as a duplicate of this bug. ***
Comment 12 Pali Rohár 2016-11-22 00:23:25 UTC
Git commit 19957f9324a5ae45bcb1479f1bb017efa77d0aa7 by Pali Rohár.
Committed on 21/11/2016 at 23:31.
Pushed by pali into branch 'master'.

When updating OTR GUI icon properly set OTR instance tag

Without configured instance tag libotr library does not encrypt sent
messages and moreover it even does not report any error that message was
not encrypted.

This should fix a bug when OTR "encrypted" icon is shown in GUI and libotr
itself does not want to encrypt messages. It happened when Kopete window
with active OTR session was closed and after that again opened.
FIXED-IN: 16.12

M  +4    -0    plugins/otr/otrlchatinterface.cpp

http://commits.kde.org/kopete/19957f9324a5ae45bcb1479f1bb017efa77d0aa7
Comment 13 Pali Rohár 2016-11-22 00:28:29 UTC
Fix is in master branch. Please recheck that it is really working correctly now. If is no problem I will merge fixes into Applications/16.12 branch.

The whole problem is in unfriendy libotr library with poorly designed API. It did not report any encryption error and passed messages unencrypted... I do not know if I could trust libotr library anymore.
Comment 14 OlafLostViking 2016-11-24 13:45:52 UTC
Thanks for debugging!

I installed kopete in my neon test vm (400 MiB stuff X-D ), but from there it cannot connect at all... So I wasn't able to test it for now. But will your fix just correct the GUI or will it prevent Kopete/libotr from ending the OTR encryption just when closing a window? The latter would be preferable, of course ;)
Comment 15 OlafLostViking 2016-11-24 14:18:30 UTC
Okay, managed to get it to work (Kopete in GIT master/Neon cannot connect to kdetalk.net anymore, so I created another account which worked).

The problem is still there (packages from today, minutes ago). Closing the window will break all further encrytion (even when I choose to restart the OTR session!). Only a restart of kopete and establishing a new OTR session makes encryption work again.
Comment 16 Pali Rohár 2016-11-24 17:54:12 UTC
(In reply to OlafLostViking from comment #14)
> But will
> your fix just correct the GUI or will it prevent Kopete/libotr from ending
> the OTR encryption just when closing a window? The latter would be
> preferable, of course ;)

It will fix GUI status icon. Also if there is active OTR session (handled in libotr) it is restored in re-opened chat window.
Comment 17 Pali Rohár 2016-11-24 17:55:41 UTC
(In reply to OlafLostViking from comment #15)
> Okay, managed to get it to work (Kopete in GIT master/Neon cannot connect to
> kdetalk.net anymore, so I created another account which worked).
> 
> The problem is still there (packages from today, minutes ago).

From which git commit?

> Closing the
> window will break all further encrytion (even when I choose to restart the
> OTR session!). Only a restart of kopete and establishing a new OTR session
> makes encryption work again.

Can you specify steps to reproduce?

When I start OTR session with jabber contact, send message, close window, open window again, then session stay active and new sent messages are also encrypted.
Comment 18 OlafLostViking 2016-11-24 20:09:16 UTC
(In reply to Pali Rohár from comment #17)
> From which git commit?

Mh, it looks like Kopete isn't even built for neon dev unstable. Which means I didn't test the newest version but some older one packaged by ubuntu(?). Sorry for the noise! (And I hope I'll get this Neon VM clean again from all these packages ;-) )
Comment 19 Pali Rohár 2016-11-24 20:14:41 UTC
If you want, you can use Ubuntu live CD (= do not need to install) and add this PPA repository: https://launchpad.net/~pali/+archive/ubuntu/kopete

It contains daily builds from kopete git repository for all supported Ubuntu versions.
Comment 20 Pali Rohár 2016-11-26 19:57:53 UTC
There is no break reported, so I'm marking this bug back as Fixed.
Comment 21 OlafLostViking 2016-11-26 22:16:00 UTC
Sorry - I'm not that fast ;-)

Since I'm no Ubuntu user, I was struggling to get your repo to work. But in the meantime I found out I have to add the "universe" repo for that. (Perhaps it would be possible that the Neon guys just include your kopete sources into their build system? It would be great to have one single "reference" setup for helping to test out new builds.)

So far it looks like the problem is fixed, now! Great - I hope this will soon be available on my Arch machine :D