equalitie / np1sec-test-client

A full-featured proof of concept implementation of an np1sec chat client, implemented as a pidgin plugin.
20 stars 7 forks source link

Using multiple clients causes segfault #7

Closed graphiclunarkid closed 7 years ago

graphiclunarkid commented 7 years ago

Reproduction steps:

  1. log in with client A
  2. enter a plain room with client A
  3. enter the encrypted room in client A
  4. log in with client B
  5. enter the same plain room with client B (A lot of "Room: Disconnected()" status messages appear in the plain room.)
  6. leave the plain room from client B
  7. write something in the plain room in client A
  8. write something in the encrypted room in client A (Client A crashes while writing.)

Same login on both clients.

It should be easy to check by copying "pidgin-home" to "pidgin-home2" and firing up "pidgin --config=pidgin-home2".

inetic commented 7 years ago

The crash is now fixed in the devel branch.

The problem "A lot of Room::Disconnected() status messages appear" I believe is in np1sec and is two fold. When np1sec-test-client receives RoomInterface::disconnected it does some cleanup but doesn't call Room::connect again, does np1sec try to connect implicitly and thus causing a loop?

The bigger problem is that np1sec relies on the server to assign unique username per user per room. This confuses np1sec when there are two clients with the same username (I believe it sees the other user as adversary who's trying to impersonate it and thus disconnects).

@redlizard FYI ^

inetic commented 7 years ago

This is now an np1sec issue: https://github.com/equalitie/np1sec/issues/42