Commit graph

2,687 commits

Author SHA1 Message Date
Goffi
1b8345f4af core (xmpp): server certificate validation:
XMPP server certificate is now checked, and connection is refused (by default) if it's not valid.
Certificate check can be disabled in the new parameter "Configuration/check_certificate".
If certificate checking is disabled, a warning note is sent on every new connection.
Twisted and Wokkel are temporarly monkey patched in sat.core.tls_patches module, until modifications are merged upstream.
2018-11-10 10:16:35 +01:00
Goffi
867f58cd4e quick frontend (contact list): use property to retrieve "whoami" in ProfileContactList:
this avoid a crash introduced by early creation of contact list during profile plugging, and avoid desynchronisation risk.
2018-11-09 16:17:45 +01:00
Goffi
154ba0d349 quick frontend (app): create the contact list immediatly on plug
This avoid crash when contact list is used while connexion is not done yet or not possible (e.g. server unavailable).
2018-11-05 09:13:05 +01:00
Goffi
18a4d3d544 core: fixed package name for Android 2018-10-05 13:42:06 +02:00
Goffi
bcab68049a template: better css files order 2018-10-03 20:38:10 +02:00
Goffi
c7698c5057 plugin identity: fixed nick when there is no user part in entity 2018-10-03 20:37:12 +02:00
Goffi
86a52e58a6 jp (info): replaced "Client" by the more generic "Software" 2018-09-27 08:51:01 +02:00
Goffi
2d37dc64e9 template: fixed by variable used in css_files_noscript 2018-09-27 08:50:38 +02:00
Goffi
9771affbcc install: don't do conditional requirement for omemo anymore, it should now work on all unixes 2018-09-23 17:02:47 +02:00
Goffi
c1994b853f doc: CHANGELOG update 2018-09-20 19:52:47 +02:00
Goffi
465ba81bc2 install: use omemo in install_requires only for platforms supported upstream 2018-09-20 19:04:02 +02:00
Goffi
1887d4d733 template: overriden get_template to always have full template name:
Environment.get_template has been overriden to have always full template name (i.e. template with (site/theme) prefix or absolute template).
This is needed to correctly handle cache, so "base/base.html" is converted to "(some_site/some_theme)base/base.html" and won't conflict with an other theme "base/base.html".
2018-09-18 20:59:34 +02:00
Goffi
0a7a2a0902 template: import contextfilter as module attribute 2018-09-18 20:55:58 +02:00
Goffi
da424c4440 core (exceptions): new ConfigError exception 2018-09-18 20:53:50 +02:00
Goffi
6d3e396d01 jp (blog/import): removed now useless generation of url_redirections_profile config key 2018-09-14 16:45:11 +02:00
Goffi
aa10a033b9 jp: fixed bad call to quit 2018-09-14 16:44:34 +02:00
Goffi
e70405cfc2 tools (common/template), jp: refactoring to handle multiple sites:
- site can now be specified in template header before theme, for instance: (some_site/some_theme)path/to/template.ext
- absolute template paths are now implemented, but Renderer must be instanciated with trusted to True for security reason (it's the case for jp)
- a new "front_url_filter" callable can be given to Renderer, which will convert template path to URL seen by end-user (default to real path).
- the "front_url_filter" can be used in templates with… "front_url" filter
- template_data is a new named tuple available in templates, which give site, theme and template relative URL
- search order is site/theme, site/default_theme, and default/default_theme where default link to sat_pubsub templates
- when loading CSS files, files with _noscript suffixes are now loaded, and used when javascript is not available
- "styles_extra.css" is also loaded before "styles.css", useful when a theme want to reuse default style, and just override some rules
- new site can be specified in sat.conf [DEFAULT] section, using sites_path_public_dict or sites_path_private_dict (where sites_path_private_dict won't be used in public frontends, like Libervia)
- "private" argument of Renderer tells the renderer to load private sites or not
- templates are now loaded from "templates" subdirectory, to differenciate them from other data like i18n
- jp template output has been updated to handle those changes, and to manage absolute templates
2018-09-10 08:58:18 +02:00
Goffi
1a770a48ee core(twisted): install reactor before doing anything else 2018-08-31 17:18:51 +02:00
Goffi
5d6321ec9f frontends (xmlui): class_map is now an arg of create function:
class_map was so far used as a global value, but in some cases, several XMLUI managers may be used (it's the case in Cagou's remote controllers plugins, template_xmlui is used to manage remotes).
This patch set class_map as a create argument, this way it can be set with partial, and several XMLUI managers can be instanced at the same time.
2018-08-31 16:03:12 +02:00
Goffi
14fd4252eb core, frontends (xmlui): added "hidden" widget, to specify a value to be returned unmodified 2018-08-31 15:57:11 +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
8792a16337 core: findByFeatures fixes 2018-08-31 15:29:25 +02:00
Goffi
6fe84eb8bf core: minor version fix for pyjamas workaround 2018-08-31 15:25:25 +02:00
Goffi
1cb7461f99 quick frontend (app, chat): encryption handling:
- new QuickApp.ENCRYPTION_HANDLERS class attribute, if True (default), encryption handlers are set
- encryption plugins are retrieved on startup and cached in QuickApp.encryption_plugins list
- QuickChat's encrypted boolean attribute indicate if a session is currently encrypted. This is updated
  automatically if ENCRYPTION_HANDLERS is set
- if ENCRYPTION_HANDLERS is set, messageEncryptionStarted and messageEncryptionStopped are called when
  suitable.
2018-08-11 18:24:55 +02:00
Goffi
3fc6de121a jp (message): new encryption/algorithms command to retrieve available encryptions algorithms. 2018-08-11 18:24:55 +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
f1cbf0659e core (xmpp): send initial presence only after all profileConnected have been treated:
presence is now sent after profileConnected methods are done, this avoid to have to deal with synchronisation in connection event.
For instance, PEP events should not be sent before presence is sent, so profileConnected methods can assume PEP events are not
done yet, and do needed initialisation using async method if necessary.

This has been done to avoid overcomplicated synchronisation in XEP-0384 plugin (network calls are needed to initialise session,
but PEP events need an initialised session to be treated).
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
e4bda681b8 core (memore/encryption): new methods and checks:
Following methods are now available though bridge:
    - messageEncryptionStop
    - messageEncryptionGet: retrieve encryption data for a message session
    - encryptionPluginsGet: retrieve all registered encryption plugin

Following methods are available for internal use:
    - getPlugins: retrieve registerd plugins
    - getNSFromName: retrieve namespace from plugin name
    - getBridgeData: serialise session data (to be used with bridge)
    - markAsEncrypted: mark message data as encrypted (to be set by encryption plugin in MessageReceived trigger)

Behaviours improvments:
    - start and stop send messageEncryptionStarted and messageEncryptionStopped signals, and a message feedback
    - new "replace" arguments in start allows to replace a plugin if one is already running (instead of raising a ConflictError)
    - plugins declare themselves as "directed" (i.e. working with only one device at a time) or not.
      This is checked while dealing with jids, an exception is raised when a full jid is received for a non directed encryption.
    - use of new data_format (de)serialise
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
9291d24a99 tools (common/data_format): added serialise and deserialise methods (using json for now) 2018-08-11 18:24:55 +02:00
Goffi
64d502958f core (bridge): new messageEncryptionStarted and messageEncryptionStopped signals (not used yet) 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
48427e3bdd core (memory/encryption): start improvments, stop and getSession:
- "start" won't do anything if session is already encrypted with requested algorithm, and will raise a ConflictError if it's already encrypted but with an other algorithm
- implemented "stop", with an optional namespace to check we are stopping the expected algorithm
- "getSession" retrieve the current encryption session of a jid, if any
2018-08-11 18:24:55 +02:00
Goffi
c5c46f3558 tools (trigger, async_trigger): added no_cancel argument to point and asyncPoint when a trigger must not be cancellable 2018-08-11 18:24:52 +02:00
Goffi
027909103e core: we are in dev version again 2018-08-04 13:03:44 +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
32b4db60c9 core: new EncryptionHandler class which manage encrypted session as a core feature:
Plugin handling encryption can now register using host.registerEncryptionPlugin, and an encryption session can now be started using messageEncryptionStart bridge method.

This will make encryption handling more easy, as we now know if a session is clear or e2e encrypted, and which plugin handle it.
2018-07-29 19:22:56 +02:00
Goffi
68014352a0 core: added async TriggerManager
Async trigger manager add an asyncPoint method which can be used with Deferred (or sync method).
This allow a triggers do to some long operations like doing network requests.

MessageReceived and sendMessageData now use asyncPoint.
2018-07-29 19:22:51 +02:00
Goffi
34a6d18475 core (memory/persistent): better default value handling in LazyPersistentBinaryDict (don't jump to debugger in debug mode if value is not found) 2018-07-29 18:44:49 +02:00
Goffi
ff79fa3ce0 core: style improvments (90 chars limit) 2018-07-29 18:44:27 +02:00
Goffi
0e23f244f5 Added tag 0.7.0a2 for changeset b42aa52d2621 2018-07-08 18:38:32 +02:00
Goffi
86c0767a96 0.7.0a2 release 2018-07-08 18:38:29 +02:00
Goffi
a3ed513ee1 install (setup.py): don't use sys.prefix for locales 2018-07-08 18:37:36 +02:00
Goffi
9e03d02f18 jp (blog): fixed path encoding for inotify 2018-07-08 11:15:22 +02:00
Goffi
133e184c5e Added tag 0.7.0a1 for changeset 534b264d63df (replace former tag after setup fix) 2018-07-04 08:00:19 +02:00