Commit graph

2,783 commits

Author SHA1 Message Date
Goffi
37ea73b19f frontends, jp, templates: added XHTMLBox widget:
for jp, the XHTML is rendered for now using markdown.
2019-01-19 11:39:02 +01:00
Goffi
87871fabca core (XMLUI): new XHTMLBox widget:
XHTMLBox is a textbox specialised in XHTML, i.e. it renders the XHTML when in read_only, and it allows to edit it.
The XHTML is cleaned by default, the cleaning is done by Text Syntaxes plugin (actually there is a cleaning method which can be set by any plugin, but Text Syntaxes is the one which does it).
2019-01-19 11:39:02 +01:00
Goffi
db0b00557a plugin text syntaxes: cleanStyle is an independent method, cleanXHTML is now blocking (no need to launch thread for that) 2019-01-19 11:39:02 +01:00
Goffi
f1c0eca9ab plugin text syntaxes: changed import name to TEXT_SYNTAX (better with underscore for autocompletion) 2019-01-19 11:39:02 +01:00
Goffi
604ff498da changelog: update 2019-01-19 11:38:54 +01:00
Goffi
e2ab5e33c8 core, XEP-0315: move XML element handling to sat_tmp:
XML Element is now implemented in sat_tmp, so it can be available also for SàT Pubsub.
The XEP-0315 is thus not needed anymore and have been removed, XEP-0315 namespace has been added to base disco features.
Use the new install() function of sat_tmp to do the patching.
2019-01-16 09:18:16 +01:00
Goffi
bbdf716d93 jp (pubsub): new "transform" command:
This command allows to pass all requested items through an external command to filter them (i.e. modify their content).
- created new jp.xml_tools module with some common functions (like lxml parsing)
- new EXIT code EXIT_CMD_ERROR (used when a third party utility returns an error)
2019-01-15 08:51:56 +01:00
Goffi
7e9ebc84a7 plugin pubsub admin: pubsub administrator first draft:
This experimental protocol allows to publish items where publishers can be specified.
2019-01-15 08:51:54 +01:00
Goffi
0dad996942 jp (base): fixed default values for --max-items and --max when using pubsub 2019-01-12 16:50:58 +01:00
Goffi
9ad46b42f2 plugin pubsub schema: code formatting minor update 2019-01-12 16:50:13 +01:00
Goffi
4fe4d9a5f1 jp (pubsub/search): fixed name for node_max 2019-01-12 16:49:23 +01:00
Goffi
7e0038ba13 plugin XEP-0315: implementation of Data Forms XML Element 2019-01-12 15:01:20 +01:00
Goffi
8e338bf913 date update 2019-01-12 12:25:31 +01:00
Goffi
6f4c7bd950 tools (common/data_objects): moved BlogItems._parseMetadata to a parsePubSubMetadata function, so it can be used in a more generic way 2019-01-11 21:38:20 +01:00
Goffi
173e192526 plugin XEP-0060: set a 30s timeout on items get 2019-01-11 19:49:01 +01:00
Goffi
180b4790bf core (disco): client.disco.requestInfo failure are re-raised:
so far, requestInfo failure where logged as a warning, and an empty disco was returned.
This prevented the requesting entity to know about the error, so now the error is logged and re-raised.
CancelError are converted to TimeoutError (requestInfo is only cancelled on timeout).
An empty disco is still cached in case of failure, to avoid re-waiting for the entity on next request.
2019-01-11 19:48:20 +01:00
Goffi
c5a17cc9ef core: findByFeatures speed improvments:
- DeferredList are used instead of waiting for each disco individually
- a Timeout of 10 s is set for jids, to avoid waiting for minutes when some entity is unreachable (which leads to terrible user experience while waiting for a discovery page)
2019-01-11 19:44:46 +01:00
Goffi
d88d2a7d8f tools (common/data_objects): metadata parsing in BlogItems:
metadata are parsed to deserialise some well known values like rsm index and count, and some properties have been added to have easier access.
A "complete" property (or item in metadata) is set to True if we are on the last page, False if we are not, or None if we don't have enough data to know if we are on the last page or not.
2019-01-11 16:35:13 +01:00
Goffi
7a9ee35cfc misc: replaced all "dummy" by the more conventional and readable "__" ("_" being used for gettext) 2019-01-11 11:13:15 +01:00
Goffi
fa0179f87e jp (base): MAM and RSM arguments can now be used for pubsub commands:
- RSM and MAM args arguments have been added to pubsub group, and activated when multiple items are possible
- /!\ --max-items (i.e. pubsub original max) short option has been change for -M, and -m is now used for RSM max
- pubsub/search -m option has been renamed -M for same reason as above
- pubsub/search -o option has been replaced by -k (for keep), to avoid conflict with order-by (and long version is now --node-max)
2019-01-11 10:18:02 +01:00
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
b33d1f66de core (XMLUI): small optimisation: introspection is done once at module loading instead of on each XMLUI instantiation 2019-01-11 09:48:17 +01:00
Goffi
169165e4ee jp (base, pubsub, ticket): handle order-by:
--order-by has been added to pubsub group.
New getPubsubExtra helper method generate extra dict according to arguments.
getPubsubExtra is used for pubsub/get, blog/get and and ticket/get.
2019-01-06 17:39:57 +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
02dc38762e core (constants): added a constant for "encrypted" 2019-01-04 18:46:02 +01:00
Goffi
ed0312261e core (xmpp): don't add to history a message if there is no message and no subject. 2019-01-04 18:44:43 +01:00
Goffi
a93bf01800 plugin XEP-0380: Explicit Message Encryption implementation 2019-01-04 11:14:53 +01:00
Goffi
9ad238b884 core (memory/encryption): added getNamespaces method to retrieve all plugins namespaces 2019-01-04 11:14:17 +01:00
Goffi
1307adcd71 core (xmpp): added "extra" argument to client.feedback 2019-01-04 11:13:31 +01:00
Goffi
ccfdb695bc memory (sqlite): minor comment move 2019-01-04 09:26:57 +01:00
Goffi
610e88841a memory (sqlite): retry _runInteraction in the same way as for _runQuery, this improve reliability 2019-01-04 09:21:16 +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
e5e0913aec core (xmpp): implemented human friendly __unicode__ for client 2019-01-03 20:51:08 +01:00
Goffi
7dc9aae5aa tools (xml_tools): isXMLUICancelled helper function to check if an XMLUI has been cancelled from raw XML. 2019-01-03 20:49:21 +01:00
Goffi
c059645abf jp (message/send, encryption): encryption handling:
- encryption algorithm can now be requested when sending a message (using --encrypt option)
- new encryption commands to (de)activate encryption session, check available algorithms, or manage trust.
2019-01-02 18:50:57 +01:00
Goffi
bd9cec8b47 jp (xmlui): JidWidget + small improvments:
- JidWidget is now handled basically using TextWidget.
- EmptyWidget display an empty line.
- BoolWidget display current value with an asterisk when write is allowed.
- fixed an bug in LabelContainer when for_name was not specified.
2019-01-02 18:50:47 +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
24c4cc0487 frontends (XMLUI): TabsContainer can now be the main container (Primitivus keep the old behaviour and always use VerticalContainer as main container) 2019-01-02 18:32:16 +01:00
Goffi
c2a1ba3793 core (xmpp): don't send message without message or subject to bridge (and log a warning in frontends if such a message is received) 2019-01-02 18:28:30 +01:00
Goffi
6e38be1dab core (memory/sqlite): new delPrivateNamespace method to delete all data of a specific namespace for a profile. 2019-01-02 18:25:55 +01:00
Goffi
c87e9a23e3 core (memory/persistent): new LazyPersistentBinaryDict.remove method 2019-01-02 18:24:14 +01:00