Commit graph libervia-backend/sat/plugins
Author SHA1 Message Date
Goffi
8f7196aafb XEP-0059: max value check:
check that max is not negative, this is to spot the accidental use of C.NO_LIMIT for max
2019-01-11 09:48:19 +01:00
Goffi
3e63d54e3d plugins XEP-0060, XEP-0313: implemented Order-By protoXEP:
new "order_by" key can be used in extra data, value can be, for now, "creation" or "modification".
2019-01-06 17:36:51 +01:00
Goffi
677eebd553 plugin XEP-0380: register namespace 2019-01-06 17:34:56 +01:00
Goffi
9dd628d1ed plugin XEP-0060: fixed MAM return value on getItems():
callback to generate metadata was using wrong items in return argument.
2019-01-06 17:33:53 +01:00
Goffi
70253cd205 plugin XEP-0384: give feedback to user when trust must be handled before sending a message 2019-01-05 14:15:11 +01:00
Goffi
e3f279e718 plugin android: fixed path for .cagou_status 2019-01-04 19:12:43 +01:00
Goffi
e47a9b2027 plugin manhole: manhole debug plugin, first draft:
this plugin open a telnet server which open a Python interpreter and allows to inspect the backend while it is running.
To enable it, the settings "manhole_debug_dangerous_port_int" must be set to the desired TCP port in [DEFAULT] section of sat.conf.
A warning will be logged if the server is enabled.

Currently only a telnet server is available, and no login is required. This may change in the futur to enable login/password and ssh access, or even an XMPP access.
This is a debugging feature and must only be used during development.
Once in the Python interpreter, the "host" variable is accessible.
2019-01-04 18:59:24 +01:00
Goffi
7e5a2f59cf plugin XEP-0380, XEP-0384: use C.EXTRA_INFO_DECR_ERR as info sub-type when a message can't be decrypted. 2019-01-04 18:47:56 +01:00
Goffi
554248e108 plugin OTR: fixed a bug which was tagging every message as "encrypted" 2019-01-04 18:46:39 +01:00
Goffi
a93bf01800 plugin XEP-0380: Explicit Message Encryption implementation 2019-01-04 11:14:53 +01:00
Goffi
30081bba79 plugin XEP-0384: don't ignore StanzaError if it's not item-not-found 2019-01-04 09:20:32 +01:00
Goffi
6a64556fd2 plugin XEP-0384: various bug fixes:
- fixed trust management on message sending, when trusts are missing
- retrieve identiy keys when trust has not been set yet
- added our own device when it is found missing on PEP notification
- mark message as trusted when suitable
2019-01-03 21:04:55 +01:00
Goffi
09020b7108 core (memory/encryption), plugin OTR: finished OTR integration in encryption:
- messageEncryptionStart and messageEncryptionStop are now async
- an encryption plugin can now have a startEncryption and endEncryption method, which are called automatically when suitable
- trust is now put in "trusted" key of message_data, and markAsTrusted has been added, it is used in OTR
- getTrustUI implemented for OTR, using legacy authenticate code
- catch potr.crypt.InvalidParameterError on decryption
- fixed some service OTR messages which were not correctly marked as not for storing, and thus were added to MAM archive/carbon copied
- other bug fixes
2019-01-03 21:00:00 +01:00
Goffi
111d77e75e plugin XEP-0384: update to last python-omemo + trust management:
- Plugin has been updated to use last version of python-omemo (10.0.3).
- A temporary method remove all storage data if they are found, this method must be removed before 0.7 release (only people using dev version should have old omemo data in there storage).
- Trust management is not implemented, using new encryptionTrustUIGet method (an UI is also displayed when trust handling is needed before sending a message).
- omemo.DefaultOTPKPolicy is now used, instead of previous test policy of always deleting.

OMEMO e2e encryption is now functional for one2one conversations, including fingerprint management.
2019-01-02 18:50:28 +01:00
Goffi
b906423cfb plugin XEP-0198: rised ACK_TIMEOUT + set req_time to None when timing out to be ready after resuming 2018-12-27 09:21:10 +01:00
Goffi
d3d39bad5d plugin XEP-0045: fixed bad MAM detection on join 2018-12-26 17:21:39 +01:00
Goffi
6852b6b677 plugin XEP-0198: allow to customise/disable ack_timeout:
"ack_timeout" setting can be set in [DEFAULT] section to the number of seconds before timing out, or to 0 to disable the timeout.
2018-12-26 17:21:38 +01:00
Goffi
9c95044cb8 plugin OTR: catch and log potr.context.ErrorReceived instead of raising it. 2018-12-26 17:18:52 +01:00
Goffi
3515defd64 plugin XEP-0198: abort connection if ack is not received after a timeout:
If ack is not received after a given time (currently 25s), connection is aborted.
This avoid waiting forever when TCP link is lost (i.e. switching from cable to wifi), and allows to use resuming mechanism.
2018-12-26 14:37:13 +01:00
Goffi
bea35db274 plugin XEP-0045: don't loop when initiating MAM archive 2018-12-12 08:58:52 +01:00
Goffi
8cc39ea3a5 plugin XEP-0045: request 50 *last* MAM messages if new archive 2018-12-12 01:13:15 +01:00
Goffi
c77bc72490 plugin XEP-0313, XEP-0045: loop MAM requests until whole archive is retrieved:
- plugin xep-0313: new serialise method
-                : getArchives now returns an extra mam_response dict with "complete" and "stable" status
-                : MAMGet now return a new metadata dict before profile (with serialised RSM and MAM response)
2018-12-10 20:34:45 +01:00
Goffi
97915f0fbe plugin XEP-0059: added serialise method 2018-12-10 20:34:45 +01:00
Goffi
35e15c664c plugin XEP-0045: MAM implementation for MUC 2018-12-07 19:13:28 +01:00
Goffi
6bb1b599ab plugin XEP-0313: improvments to prepare MUC MAM:
- discard groupchat message when retrieving last stanza_id on connection
- service can be specified in getMessageFromResult
- service is also used when using getArchives from bridge
2018-12-07 17:43:43 +01:00
Goffi
8e27547531 plugin XEP-0060: use new parseExtra methods from MAM and RSM 2018-12-01 10:34:42 +01:00
Goffi
39d2409273 plugin XEP-0313: implementation of MAM for messages:
- (core/xmpp): new messageGetBridgeArgs to easily retrieve arguments used in bridge from message data
-            : parseMessage is not static anymore
-            : new "message_parse" trigger point
- (xep-0313) : new "MAMGet" bridge method to retrieve history from MAM instead of local one
-            : on profileConnected, if previous MAM message is found (i.e. message with a stanza_id), message received while offline are retrieved and injected in message workflow.
               In other words, one2one history is synchronised on connection.
-            : new "parseExtra" method which parse MAM (and optionally RSM) option from extra dictionary used in bridge.
2018-12-01 10:33:43 +01:00
Goffi
7d82242b74 plugin XEP-0059: added "parseExtra" method to easily handle RSM argument coming from bridge. 2018-12-01 10:10:25 +01:00
Goffi
a29893ac1f core: minor style/typos fixes 2018-12-01 10:04:17 +01:00
Goffi
c18a40e7cc plugin XEP-0359: Unique and Stable Stanza IDs implementation, first draft 2018-12-01 09:57:25 +01:00
Goffi
05b59775d0 plugin XEP-0198: Stream Management implementation:
- hooks can now be set in stream onElement and send methods
- xmllog refactored to use new hooks
- client.isConnected now uses transport.connected method
- fixed reconnection, SàT will now try to reconnect indefinitely until it success, unresolvable failure happen (e.g. invalid certificate), or explicit disconnection is requested (or a plugin change this behaviour)
- new triggers: "stream_hooks", "disconnecting", "disconnected", and "xml_init" (replace "XML Initialized")
2018-11-18 15:49:46 +01:00
Goffi
3a07122da9 plugin XEP-0199: implementation of XMPP Ping 2018-11-10 10:16:38 +01:00
Goffi
c7698c5057 plugin identity: fixed nick when there is no user part in entity 2018-10-03 20:37:12 +02:00
Goffi
ae90df1a4a plugin XEP-0050, adhoc D-Bus: Ad-Hoc improvment + remote media control:
- "commands" namespace is now registered
- added "do" and "getCommandElt" methods to XEP-0050 to run ad-hoc commands from backend
- commands for a profile are now stored in client._XEP_0050_commands
- Ad-Hoc D-Bus plugin can now be run without lxml or dbus (degraded)
- use MPRIS to control media players
- new adHocRemotesGet bridge method retrieve media players announced in all devices of the profile
2018-08-31 15:47:00 +02:00
Goffi
d206324fbe plugin XEP-0384: PEP handling + mark as encrypted:
devices are gotten using PEP and +notify, and bundles are then retrieved, and kept in cache.
This allow to remove the test code which was always requesting devices and bundles before
sending a message. For now OMEMO plugin will only work with people in roster, this will be
fixed in the future.
2018-08-11 18:24:55 +02:00
Goffi
aa262570a6 plugin XEP-0163: fixed bad PEP filtering 2018-08-11 18:24:55 +02:00
Goffi
e18036d2fb plugin OTR: use new "directed" attribute when registering + use new markAsEncrypted 2018-08-11 18:24:55 +02:00
Goffi
7eab898ef3 plugin otr: use namespace specified in XEP-0378 2018-08-11 18:24:55 +02:00
Goffi
583d4b0c2e plugin XEP-0384, install: adapted plugin to omemo module changes + added omemo module to dependencies:
- omemo module logs are now integrated in SàT
- OmemoStorage adapated to changes
- now really delete OTPK each time, behaviour may be modified in future
- fixed bad arguments used during decryption
- adapted to other changes

OMEMO is now working \o/
It still needs some adjustements though: bundles/devices are for the moment requested on each message encryption, and fingerprints management is not implemented yet.
2018-08-11 18:24:55 +02:00
Goffi
cadc29f8c2 plugin OTR: integrated in new encryption handler + fixed use of bare jid where full jid was expected 2018-08-11 18:24:55 +02:00
Goffi
11058bec8a plugin XEP-0334: added a method to add hint directly to elements (i.e. on domish.Element instead of message data) 2018-08-11 18:24:55 +02:00
Goffi
14412f7a27 plugin XEP-0384: OMEMO implementation first draft:
this is the initial implementation of OMEMO encryption using python omemo module.
/!\ This implementation is not yet working /!\
2018-07-29 19:24:21 +02:00
Goffi
34f3a2e949 plugin XEP-0060: added singleton ID ("current") 2018-07-29 19:23:01 +02:00
Goffi
ff79fa3ce0 core: style improvments (90 chars limit) 2018-07-29 18:44:27 +02:00
Goffi
653b1f1155 plugin XEP-0077: fixed RegisteringAuthenticator to use TLS if possible 2018-07-04 07:26:20 +02:00
Goffi
b9a6cdd785 plugin merge-request/mercurial: fixed missing last line in diff while parsing patch 2018-06-29 15:54:46 +02:00
Goffi
d5c9fa5e31 plugin XEP-0070: use a confirm dialog instead of a form + simplified a bit the code 2018-06-27 21:15:34 +02:00
Goffi
744cb0c503 code style reformatting using black 2018-06-27 20:14:46 +02:00
Goffi
4127bcffd0 plugin merge request (mercurial): clean item_id for import (some chars are not accepted in name) 2018-06-27 07:51:29 +02:00
Goffi
da71887397 core: lines limit 2018-06-27 07:50:35 +02:00