python-otr/pure-python-otr

gotr plugin fingerprint bound on resource

iconbit opened this issue · 1 comments

On the gotr plugin, when you verify a users fingerprint, it sets the verification on the account including the resource.

So if you verify the fingerprint for dude@example.com/computer , the fingerprint works only for "dude@example.com/computer"

So when the contacts resource changes to dude@example.com/laptop , even though the fingerprint is the same, you need to authenticate the user again.

This is especially annoying when talking to contacts using pidgin who havnt set a resource, as pidgin will generate a different string each time the user connects.

I think that the fingerprint should be checked only against the account "dude@example.com" without including the resource.

I'm not sure about that.
Currently, fingerprints are closely connected to contexts, which represent OTR connections between two endpoints. If we had contexts without ressources, a contact online from multiple ressources would cause issues, for example: changing from /desktop to /mobile, we would still use the same OTR session, even if the /mobile client does not understand OTR at all.

I'll think about moving the trusts from the contexts to the accounts, so the application can define their own key for each contact.