Commit graph

3700 commits

Author SHA1 Message Date
Georg Lukas
3c5de0a49f invitation: display QR code black-on-white 2020-01-21 22:53:28 +01:00
Georg Lukas
612eebb5c3 invitation: QR plugin to show invitations 2020-01-19 19:07:33 +01:00
dc83fd6084 Merge branch 'pip3' into 'master'
doc: list additional required packages, add Debian two-liner

See merge request poezio/poezio!61
2020-01-19 00:02:56 +01:00
Georg Lukas
f7c4a13dda doc: list additional required packages, add Debian two-liner 2020-01-18 23:47:10 +01:00
71d67d7fbd Merge branch 'pip3' into 'master'
doc: explicitly use pip3

See merge request poezio/poezio!60
2020-01-15 17:51:40 +01:00
Georg Lukas
3b0d602fc2 doc: explicitly use pip3 2020-01-15 17:40:06 +01:00
911784a898 Merge branch 'biboumi-carbons' into 'master'
Don't ignore carbons if biboumi

See merge request poezio/poezio!59
2020-01-14 10:20:40 +01:00
5e404377d4
Disco#info barejid instead of domain only on carbons
There is no apparent reason why a disco#info should be done on the
domain Jid rather than the bare Jid. MUCs advertize their MUC-y-ness on
the bare Jid. This will also fix cases like chat@dino.im which is a MUC
component itself (whereas dino.im is a user host), and biboumi
components that serves a mic of MUCs and (IRC) users.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-01-12 23:23:17 +01:00
d8f7a61271 Merge branch 'is_known_muc_pm' into 'master'
Is known muc pm

See merge request poezio/poezio!58
2020-01-12 17:30:51 +01:00
830a378792 is_known_muc_pm: search into more than MucTab
Use new `by_jid` API to search for any tab containing the barejid, and
then look at the type of Tab.

Move the Tab search at the top of the checks so that we stop searching
if we already have done all this work for previous stanzas.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-01-12 13:28:38 +01:00
0a131fcc5b Some more typing for is_known_muc_pm
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-01-12 13:28:38 +01:00
a7ab0cf59d Merge branch 'privatetab-creation-traceback' into 'master'
Prevent Traceback when receiving MUC-PM carbons under some conditions

See merge request poezio/poezio!57
2020-01-12 13:28:12 +01:00
9007b0fc8b
Prevent Traceback when receiving MUC-PM carbons under some conditions
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-01-12 13:21:44 +01:00
6b2110329b Merge branch 'e2ee-muc' into 'master'
Prevent plugin_e2ee from sending empty JID as recipient

See merge request poezio/poezio!56
2020-01-11 13:23:06 +01:00
09a3cb2152 plugin_e2ee: Remove debug logging of encrypted messages
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-01-11 12:53:29 +01:00
7f73a664a3 plugin_e2ee: prevent empty JID from being passed to plugin
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-01-11 12:53:29 +01:00
mathieui
30a7ac052a Merge branch 'rm-foo-logging' into 'master'
BasePlugin: Remove debug logging

See merge request poezio/poezio!55
2020-01-02 00:15:49 +01:00
1184e9c600
BasePlugin: Remove debug logging
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-01-01 23:51:08 +01:00
e6d2347d93 Merge branch 'e2ee-muc' into 'master'
E2ee muc

See merge request poezio/poezio!53
2020-01-01 22:52:28 +01:00
7134716343
E2EE MUC support
This change transmits the original JID of the sender (in decrypt) or
receiver(s) (in encrypt).

Handling of MUC is not complete. It is possible that some participants
have access to realjids while others don't (e.g., moderators in
semi-anon MUCs).

The code currently doesn't handle this and this will cause at least two
issues:
- Sending an encrypted message in a semi-anon MUC would reveal the
  sender's identity (public key)
- Recipients wouldn't be able to decrypt this message as they don't have
  access to the sender's realjid. Unless they already have the bundle
  available and then they could associate the public key with a jid
  (another privacy issue/defeating the point of semi-anon rooms).

TODO: Fix this ^

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-01-01 22:36:41 +01:00
92e81d8f87 Allow encryption in normal messages
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-12-31 11:54:52 +01:00
238eb8a0a1 E2EEPlugin: Mute some lint warnings because of metaclass
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-12-31 11:54:52 +01:00
323d39f932 Tabs: add by_jid search method for tabs who have a jid attr
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-12-31 11:54:52 +01:00
28be8ab0cd
Add TODO in plugin_e2ee _decrypt
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-12-30 05:39:08 +01:00
fa063ddd57 Merge branch 'plugin-omemo' into 'master'
E2EE plugins support

See merge request poezio/poezio!18
2019-12-28 22:36:27 +01:00
mathieui
abbb6a714e
Disable a pylint error on a line (due to __getattr__ override) 2019-12-28 16:47:18 +01:00
9e390085a1
omemo: omemo_plugin moved to its own repository for licensing purposes
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-12-27 19:02:09 +01:00
39e756cb35 omemo: Add TODO for unverified state
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-12-27 18:58:48 +01:00
96acbaa13d omemo: remove unnecessary newline in docstring
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-12-27 18:58:48 +01:00
fb637a597b omemo: prevent traceback when no JID is specified in non-supported tab
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-12-27 18:58:48 +01:00
c610a76fd9 omemo: use dedicated method to check if encryption is enabled
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-12-27 18:58:48 +01:00
3697e308c2 omemo: use jid property instead of name on chat tab
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-12-27 18:58:48 +01:00
931fc58199 omemo: Update decrypt_message with slixmpp-omemo changes
decrypt_message now takes an Encrypted container and a sender (JID)
instead of a Message object.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-12-27 18:58:48 +01:00
ecdd036237 omemo: Update get_fingerprints with slixmpp-omemo changes
slixmpp-omemo's get_trust_for_jid doesn't provide fingerprints directly
anymore, it simply wraps the omemo lib method.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-12-27 18:58:48 +01:00
mathieui
e8dd6f0a91 omemo: fix show_fingerprints (JID instead of str) 2019-12-27 18:58:48 +01:00
04efd8ee07 omemo: implement get_fingerprints method
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-12-27 18:58:48 +01:00
mathieui
518ba47e2a omemo: add an api in plugin_e2ee to get the fingerprint(s) of a jid 2019-12-27 18:58:48 +01:00
mathieui
5c4571751e omemo: fix an indent error and make mypy happy 2019-12-27 18:58:48 +01:00
mathieui
b40de0bcbe omemo: fix some errors / feedback in trust setting 2019-12-27 18:58:48 +01:00
mathieui
07447a465a omemo: fix the type of the supported tab tyoes 2019-12-27 18:58:48 +01:00
03499a2d2c omemo: handle MissingBundleException when it comes from EncryptionPrepareException
We're not supposed to see MissingBundleException directly as it's
handled by slixmpp-omemo. Slixmpp-omemo will give us all the remaining
exceptions via EncryptionPrepareException when it doesn't know what to
do anymore.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-12-27 18:58:48 +01:00
0e27485c36 Remove exception catchall in omemo plugin as it's now handled in plugin_e2ee
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-12-27 18:58:48 +01:00
cd3f2a197b omemo: Remove unused variable in encrypt method
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-12-27 18:58:48 +01:00
mathieui
c85c8f6c77 omemo: add supported_tab_types and trust_states into the omemo plugin 2019-12-27 18:58:48 +01:00
mathieui
25dae11eb3 omemo: add supported_tab_types and trust_states plugin attributes
- supported tab types is a list of tabs this plugin should be active in
 (only chattabs)
- trust_states is a dict[str → set] containing only two keys: accepted
 and rejected, whose values are the internal plugin states that should
 allow encryption and the ones that should not
2019-12-27 18:58:48 +01:00
4586765793 omemo: session_start is now async
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-12-27 18:58:48 +01:00
mathieui
1dd713b857 omemo: add a wrapper around _encrypt() to handle user feedback
(yes, another one)
2019-12-27 18:58:48 +01:00
mathieui
b1e913d772 omemo: fix indentation of one line 2019-12-27 18:58:48 +01:00
mathieui
e94ee52c10 omemo: add missing typing import 2019-12-27 18:58:47 +01:00
mathieui
97d29bc1cd Fix potential race condition when encrypting
(do not try to rely on the current tab)
2019-12-27 18:57:33 +01:00