Commit Graph

4627 Commits

Author SHA1 Message Date
Emmanuel Gil Peyrot 09e6cfbbc8 Update to XEP-0234 version 0.18.0 (:5 namespace). 2017-06-14 20:31:29 +01:00
Emmanuel Gil Peyrot 8356256f17 Update to XEP-0300 version 0.5 (:2 namespace). 2017-06-14 20:29:52 +01:00
Emmanuel Gil Peyrot 71f0e40c94 Update JingleFT to its latest experimental version 2017-06-14 20:26:37 +01:00
Emmanuel Gil Peyrot 2b9f9f3bb9 Synchronise hashes support with XEP-0300 in Jingle 2017-06-14 20:26:37 +01:00
Yann Leboulanger 388acfca5a fix logging single messages. Fixes #8640 2017-06-14 15:29:19 +02:00
Philipp Hörist 2c34dd6d45 Show encryption icon in chat 2017-06-11 20:06:34 +02:00
Philipp Hörist 1bf66b857a Always pass utf8 encoded strings to python-gnupg
self.encoding which we set in the init is only intended
to decode gpg´s stderr which uses a system specific encoding.

if we dont encode the data we pass to python-gnupg ourself, it will fallback and use self.encoding.
This might be of no concern if self.encoding is set to 'utf8' and when we are on Linux
which has a preferred encoding of 'utf8'.

But if we are on Windows the preferred encoding for stderr
is most of the time not 'utf8'. If python-gnupg tries to decode a stderr stream that is for example
encoded with 'cp1252' with our set encoding of 'utf8' this will fail.

The solution is to pre-encode the data before we pass it to python-gnupg, so it does not have to
use self.encoding as a fallback. And set self.encoding='latin1' because latin1 will not yield exceptions
on decoding errors. Also gpg itself will fallback to latin1 as stderr encoding when it cant determine the
preferred encoding of a system.

self.decode_errors is used for something differently, and has no influence on the situation.

Fixes #8644
2017-06-08 19:33:01 +02:00
Philipp Hörist 2872993b0c Remove unused GPG code 2017-06-08 19:10:04 +02:00
Philipp Hörist 92b0a15521 Pass use_agent to GPG init instead of overwrite 2017-06-08 19:09:22 +02:00
Philipp Hörist b5e9b07a07 Remove unused or old config values 2017-06-06 22:12:37 +02:00
Philipp Hörist ef8229615a Dont save sent MessageStanza for LMC use
There are mutliple reasons why this is not a good idea

1. It places work on encryption Plugins, as many encryption attributes inside the
stanza can not be resend again (OMEMO, OTR), so the plugins have to make sure none of
these attr are inside the LMC stanza

2. In general its not obvious for plugin devs that a stanza issued after LMC has to be
treated differently. There should be no negative effects, even when a contributor not knowing
about LMC at all.

This commit saves only the stanza id, and adds the replace tag on the new message.
This results also in less code.
2017-06-02 03:32:46 +02:00
Philipp Hörist cb65cfc5ae Add config option to activate XEP-0146 commands
Some of the Commands have security implications, thats why we disable them per default
Fixes #8378
2017-05-26 23:10:05 +02:00
Philipp Hörist 3335482345 Add 'encryption' config options group
We have to save the value per account and contact, because otherwise
it could lead to problems if a jid is added to more than one account.

As key this uses a string in the form of 'Account-BareJid'.

The config option group 'contacts' is not used because there are values
like 'speller_language' that make more sense to set on a Jid basis, rather than a
Account-Jid basis.

Treat an empty config value or no config value as 'disabled', instead
of writing a config value of 'disabled'. This has the benefit that we
dont have to write config values for contacts were we dont use encryption.
2017-05-18 21:42:40 +02:00
André Apitzsch e9038f2220 Zeroconf: SSL_ERROR_* has been moved to ssl module
fixes #8625
2017-05-16 23:51:12 +02:00
Philipp Hörist 2e148a6133 Add encryption API to groupchat_control 2017-05-07 18:40:09 +02:00
Philipp Hörist cf07022cbd Remove ESessions encryption/decryption from core 2017-05-07 18:40:05 +02:00
Philipp Hörist 3fd35a041e Remove PGP encryption/decryption from core 2017-05-07 18:38:33 +02:00
Philipp Hörist 5116af037b Add Encryption Plugin API
- Add extension points when receiving/sending a message
- Add extension point for setting the lock image
- Add extension point after clicking the send button
- Add extension point when typing
- Add a new menu button to choose the desired encryption
- Extend the PluginManager to hold a list of encryption plugins
2017-05-07 18:38:06 +02:00
Philipp Hörist 6e8e5aec51 Merge branch 'stun_discovery' into 'master'
Use account hostname for STUN server discovery

See merge request !93
2017-05-05 22:42:47 +02:00
Marc Schink 61c2259a9a Use account hostname for STUN server discovery
Use the account hostname instead of the target hostname of the
_xmpp-client._tcp SRV resource record for STUN server discovery.
Otherwise, discovery fails if both hostnames are different.
2017-05-03 10:01:49 +02:00
Philipp Hörist bc504f90b1 Make default proxy always available
If the user had an empty `file_transfer_proxies` config setting
no proxies were used. As we discover the default server proxy ourself the
user should not have to write it to his config setting to make use of it.
2017-05-02 16:55:39 +02:00
Philipp Hörist 2cd6634c0e Dont show warning on missing 0184 receipt
https://xmpp.org/extensions/xep-0184.html#what tells us that we
SHOULD NOT impute any meaning to the fact that we did not receive an ack message
2017-05-01 19:42:57 +02:00
Philipp Hörist 79dc0c49f1 Always send message delivery receipts requests
- We want to send requests also to offline contacts.
- The XEP is wide spread chances are high that a contact supports it.
- It gets really complicated, when we want to guess if a offline contact supports receipts
2017-05-01 19:23:31 +02:00
Philipp Hörist d346333d2a Drop some message from ourself
- 'received'-Carbons from ourself, because we either received
   the message directly or got a 'sent'-Carbon about it
-  Messages from our own full jid, this can happen when we send
   a Message to ourself and no other resource is online.
2017-05-01 19:08:19 +02:00
Philipp Hörist 33a584b8b0 Dont use message receipts in message to ourself 2017-05-01 19:08:11 +02:00
Philipp Hörist c49d13bcae Use BareJID when sending message to ourself 2017-05-01 17:58:55 +02:00
Philipp Hörist 2126d4304a Extend method to return our own full jid 2017-05-01 17:23:46 +02:00
Philipp Hörist 64ae063f9c Fix mediated groupchat invites
- Push Invitation and Decline event much earlier
- Refactor Logic to decide if mediated or not
  Ejabbered 17.03 does add a 'jabberconference' namespace into mediated invites which has broken our logic
- Dont add a groupchat contact on invitation, always add the inviter to the roster
2017-05-01 15:33:38 +02:00
Philipp Hörist 89f1e9820d Merge branch 'dbus' into 'master'
Port Network Watcher to Gio API

See merge request !88
2017-04-29 23:37:55 +02:00
Philipp Hörist b6db6026be Fix typo 2017-04-29 20:39:58 +02:00
Philipp Hörist 3fb12148b9 Remove not working proxys 2017-04-29 17:22:26 +02:00
Philipp Hörist 7cb7bcaae6 Refactor IBB Handlers
- Move handling of Data IQs into IBBIqHandler
- Call SendHandler with file_props
- Save last sent id in file_props.syn_id
- Remove some useless checks, now that we call SendHandler with file_props
- Send item-not-found error on invalid session id
2017-04-29 17:22:18 +02:00
Philipp Hörist 385d6c3081 On IBB cancel set correct 'to' attr 2017-04-29 16:58:41 +02:00
Philipp Hörist 0d8c008764 Fix typo in event type 2017-04-29 16:58:40 +02:00
Philipp Hörist 21700051f8 Read/Write file in binary mode 2017-04-29 16:12:41 +02:00
Philipp Hörist fde2ac731b Close IBB Stream correctly 2017-04-29 16:07:48 +02:00
Yann Leboulanger 3bc6173a11 Close IBB stream with correct SID. See #8555 2017-04-29 16:01:59 +02:00
Philipp Hörist 1840ff235e Port Network Watcher to Gio API 2017-04-25 14:51:35 +02:00
Philipp Hörist fe3a5a4aee Make some methods public 2017-04-25 14:44:38 +02:00
Philipp Hörist 0b0812bb75 Start HistoryManager with config path argument
HistoryManager was not finding the Logs.db when Gajim was
used with the -c config path argument
2017-04-21 18:44:27 +02:00
Philipp Hörist 8e3e9b4d9d Merge branch 'zeroconf' into 'master'
fix python errors in client zeroconf

See merge request !82
2017-04-19 18:55:25 +02:00
Philipp Hörist 14091642c4 Merge branch 'change_password_fix' into 'master'
Disable button if password changing is not supported

See merge request !85
2017-04-19 18:54:20 +02:00
Marc Schink 4d8379f492 Disable button if password changing is not supported 2017-04-19 18:17:22 +02:00
Philipp Hörist 86e29fb7f4 LegacyArchiving Event does not have a type 2017-04-18 18:58:06 +02:00
Philipp Hörist d7a6b6ab0b Register new MAM Events 2017-04-18 18:56:57 +02:00
Philipp Hörist 09512065d4 Fix wrong inclusion check 2017-04-18 18:26:06 +02:00
Philipp Hörist b42c21d3e0 Use new MAM Events and use chosen MAM namespace 2017-04-18 17:52:17 +02:00
Philipp Hörist 6b75f4ab35 Choose MAM namespace and save it 2017-04-18 17:50:15 +02:00
Philipp Hörist f8a028b553 Add/Modify Events to handle all MAM namespaces 2017-04-18 17:48:58 +02:00
Philipp Hörist 1d2320b0bb Add aesgcm to valid uri schemes 2017-04-15 12:02:44 +02:00