Commit Graph

2604 Commits

Author SHA1 Message Date
Erik Johnston
8046df6efa Merge branch 'develop' of github.com:matrix-org/synapse into federation_client_retries 2015-02-04 17:37:34 +00:00
Kegan Dougal
6d3e4f4d0a Update user/alias query APIs to use new format of SimpleHttpClient.get_json 2015-02-04 17:32:44 +00:00
Kegan Dougal
96d4bf9012 Modify API for SimpleHttpClient.get_json and update usages.
Previously, this would only return the HTTP body as JSON, and discard other
response information (e.g. the HTTP response code). This has now been changed
to throw a CodeMessageException on a non-2xx response, with the response code
and body, which can then be parsed as JSON.

Affected modules include:
 - Registration/Login (when using an email for IS auth)
2015-02-04 17:07:31 +00:00
Kegan Dougal
aa8cce58bf Add query_user/alias APIs. 2015-02-04 16:44:53 +00:00
Erik Johnston
d45e2302ed Merge branch 'signature_failures' of github.com:matrix-org/synapse into federation_client_retries 2015-02-04 16:30:15 +00:00
Erik Johnston
ae46f10fc5 Apply sanity to the transport client interface. Convert 'make_join' and 'send_join' to accept iterables of destinations 2015-02-04 16:28:12 +00:00
David Baker
2e77ba637a More s/instance_handle/profile_tag/ 2015-02-04 16:24:15 +00:00
Kegan Dougal
ce8bc642ae Merge branch 'develop' into application-services 2015-02-04 15:31:02 +00:00
Kegan Dougal
89f2e8fbdf Fix bug in store defer. Add more unit tests. 2015-02-04 15:21:03 +00:00
Erik Johnston
95e2d2d36d When returning lists of servers from alias lookups, put the current server first in the list 2015-02-04 15:02:23 +00:00
Erik Johnston
650e32d455 Change context.auth_events to what the auth_events would be bases on context.current_state, rather than based on the auth_events from the event. 2015-02-04 14:06:46 +00:00
Erik Johnston
ff78eded01 Retry make_join 2015-02-04 13:55:10 +00:00
Kegan Dougal
525a218b2b Begin to add unit tests for appservice glue and regex testing. 2015-02-04 12:24:20 +00:00
Kegan Dougal
17753f0c20 Add stub ApplicationServiceApi and glue it with the handler. 2015-02-04 11:19:18 +00:00
Erik Johnston
03d415a6a2 Brief comment on why we do some things on every call to persist_event and not others 2015-02-04 10:40:59 +00:00
Erik Johnston
f275ba49bb Fix state resolution to remember join_rules is a type of auth event. 2015-02-04 10:36:28 +00:00
Erik Johnston
c0462dbf15 Rearrange persist_event so that do all the queries that need to be done before returning early if we have already persisted that event. 2015-02-04 10:16:51 +00:00
Erik Johnston
02be8da5e1 Add doc to get_event 2015-02-03 17:34:07 +00:00
David Baker
dc7bb70f22 s/instance_handle/profile_tag/ 2015-02-03 16:51:07 +00:00
Erik Johnston
3c39f42a05 New line 2015-02-03 16:14:19 +00:00
Erik Johnston
7dd1c5c542 Neaten the handling of state and auth_chain up a bit 2015-02-03 16:12:04 +00:00
David Baker
9a71add1c0 Use set_tweak instead of set_sound 2015-02-03 16:06:31 +00:00
Erik Johnston
9bace3a367 Actually, the old prune_event function was non-deterministic, so no point keeping it around :( 2015-02-03 15:32:17 +00:00
Erik Johnston
8dae5c8108 Remove unused imports 2015-02-03 15:01:12 +00:00
Erik Johnston
7b810e136e Add new FederationBase 2015-02-03 15:00:42 +00:00
Erik Johnston
0dd3aea319 Keep around the old (buggy) version of the prune_event function so that we can use it to check signatures for events on old servers 2015-02-03 14:58:30 +00:00
Kegan Dougal
94a5db9f4d Add appservice package and move ApplicationService into it. 2015-02-03 14:44:16 +00:00
Erik Johnston
6efd4d1649 Don't completely die if get auth_chain or querying auth_chain requests fail 2015-02-03 13:57:54 +00:00
Erik Johnston
77a076bd25 Set combinations is | and not + 2015-02-03 13:35:17 +00:00
Kegan Dougal
f2c039bfb9 Implement restricted namespace checks. Begin fleshing out the main hook for notifying application services. 2015-02-03 13:29:27 +00:00
Erik Johnston
fed29251d7 Spelling 2015-02-03 13:23:58 +00:00
Kegan Dougal
a060b47b13 Add namespace constants. Add restrict_to option to limit namespace checks. 2015-02-03 13:17:28 +00:00
Kegan Dougal
3bd2841fdb Everyone loves SQL typos 2015-02-03 11:37:52 +00:00
Kegan Dougal
197f3ea4ba Implement regex checks for app services.
Expose handler.get_services_for_event which manages the checks for all
services.
2015-02-03 11:26:33 +00:00
Erik Johnston
06c34bfbae Give exception better message 2015-02-03 11:23:44 +00:00
Erik Johnston
4ff2273b30 Add FIXME note. 2015-02-03 11:23:26 +00:00
Erik Johnston
0f48e22ef6 PEP8 2015-02-03 10:43:29 +00:00
Erik Johnston
51969f9e5f Return rejected events if asked for it over federation. 2015-02-03 10:40:14 +00:00
Erik Johnston
e7ca813dd4 Try to ensure we don't persist an event we have already persisted. In persist_event check if we already have the event, if so then update instead of replacing so that we don't cause a bump of the stream_ordering. 2015-02-03 10:39:41 +00:00
Mark Haines
09601255f5 Merge pull request #46 from matrix-org/identicons
Add a media/v1/identicon resource for generating identicons
2015-02-02 18:56:34 +00:00
Kegan Dougal
9ff349a3cb Add defers in the right places. 2015-02-02 17:42:49 +00:00
Kegan Dougal
1a2de0c5fe Implement txns for AS (un)registration. 2015-02-02 17:39:41 +00:00
Mark Haines
a2da04b8ab Add pydenticon to python_dependencies 2015-02-02 17:37:26 +00:00
Matthew Hodgson
f3a4267757 less obscure xargs 2015-02-02 17:31:58 +00:00
Mark Haines
4574b5a9e6 Generate a list of dependencies from synapse/python_dependencies.py 2015-02-02 17:23:51 +00:00
Matthew Hodgson
8c52e6e8a1 fix typo 2015-02-02 17:12:23 +00:00
Erik Johnston
40c6fe1b81 Don't bother requesting PDUs with bad signatures from the same server 2015-02-02 17:06:37 +00:00
Mark Haines
1bb0528316 Add Cache-Control header to identicon 2015-02-02 16:57:26 +00:00
Erik Johnston
941f59101b Don't fail an entire request if one of the returned events fails a signature check. If an event does fail a signature check, look in the local database and request it from the originator. 2015-02-02 16:56:01 +00:00
Mark Haines
f2eda123b7 Fix setting identicon width and height 2015-02-02 16:32:33 +00:00