Richard van der Hoff
1d09586599
Address review comments
...
- don't blindly proxy all HTTPRequestExceptions
- log unexpected exceptions at error
- avoid `isinstance`
- improve docs on `from_http_response_exception`
2017-03-14 14:15:37 +00:00
David Baker
1ece06273e
Handle PartialDownloadError in CAS login
2017-03-14 13:37:36 +00:00
David Baker
7b6ed9871e
Use extend instead of +=
2017-03-14 10:49:55 +00:00
David Baker
d79a687d85
Oops, remove print
2017-03-14 10:40:20 +00:00
Luke Barnard
bbeeb97f75
Implement _simple_delete_many_txn, use it to delete devices
...
(But this doesn't implement the same for deleting access tokens or e2e keys.
Also respond to code review.
2017-03-13 17:53:23 +00:00
David Baker
0a9945220e
Fix registration for broken clients
...
Only offer msisdn flows if the x_show_msisdn option is given.
2017-03-13 17:29:38 +00:00
David Baker
73a5f06652
Support registration / login with phone number
...
Changes from https://github.com/matrix-org/synapse/pull/1971
2017-03-13 17:27:51 +00:00
Luke Barnard
c077c3277b
Flake
2017-03-13 16:45:38 +00:00
Luke Barnard
c81f33f73d
Implement delete_devices API
...
This implements the proposal here https://docs.google.com/document/d/1C-25Gqz3TXy2jIAoeOKxpNtmme0jI4g3yFGqv5GlAAk for deleting multiple devices at once in a single request.
2017-03-13 16:33:51 +00:00
Richard van der Hoff
170ccc9de5
Fix routing loop when fetching remote media
...
When we proxy a media request to a remote server, add a query-param, which will
tell the remote server to 404 if it doesn't recognise the server_name.
This should fix a routing loop where the server keeps forwarding back to
itself.
Also improves the error handling on remote media fetches, so that we don't
always return a rather obscure 502.
2017-03-13 16:30:36 +00:00
Erik Johnston
7eae6eaa2f
Revert "Support registration & login with phone number"
2017-03-13 09:59:33 +00:00
Matthew Hodgson
a61dd408ed
enable guest access for the 3pl/3pid APIs
2017-03-12 19:30:45 +00:00
David Baker
ece7e00048
Comment when our 3pids would be incomplete
2017-03-08 19:07:18 +00:00
David Baker
727124a762
Not any more, it doesn't
2017-03-08 19:00:23 +00:00
David Baker
d4d3629aaf
Better error message
2017-03-08 17:01:26 +00:00
David Baker
1c99934b28
pep8
2017-03-08 11:58:20 +00:00
David Baker
85bb322333
Pull out datastore in initialiser
2017-03-08 11:51:25 +00:00
David Baker
65d43f3ca5
Minor fixes from PR feedback
2017-03-08 11:48:43 +00:00
David Baker
82c5e7de25
Typos
2017-03-08 11:42:44 +00:00
David Baker
2e27339add
Refector out assert_params_in_request
...
and replace requestEmailToken where we meant requestMsisdnToken
2017-03-08 11:37:34 +00:00
David Baker
88df6c0c9a
Factor out msisdn canonicalisation
...
Plus a couple of other minor fixes
2017-03-08 11:03:39 +00:00
David Baker
402a7bf63d
Fix pep8
2017-03-08 09:33:40 +00:00
David Baker
00466e2feb
Support new login format
...
https://docs.google.com/document/d/1-6ZSSW5YvCGhVFDyD2QExAUAdpCWjccvJT5xiyTTG2Y/edit#
2017-03-07 16:37:23 +00:00
David Baker
b0effa2160
Add msisdns as 3pids during registration
...
and support binding them with the bind_msisdn param
2017-03-03 18:34:39 +00:00
David Baker
3557cf34dc
Merge remote-tracking branch 'origin/develop' into dbkr/msisdn_signin
2017-03-01 17:20:37 +00:00
Erik Johnston
acf6d4d2e3
Merge pull request #1945 from jkolo/fix_dynamic_thumbnails_aspect
...
Fix #1677 (dynamic thumbnails aspect)
2017-02-27 09:51:52 +00:00
Jurek
aea5461488
Fix dynamic thumbnails aspect
2017-02-24 22:43:27 +01:00
Erik Johnston
17673404fb
Remove unused param
2017-02-20 15:02:01 +00:00
David Baker
fa467e62a9
Merge pull request #1917 from matrix-org/dbkr/make_ban_reasons_work
...
Make kick & ban reasons work
2017-02-14 16:10:06 +00:00
David Baker
355d62c499
Make kick & ban reasons work
...
We somehow specced APIs with reason strings, preserve the content
in the events and even have the clients display them, but failed
to actually pass the parameter through to the event content.
2017-02-14 15:10:55 +00:00
David Baker
ce3e583d94
WIP support for msisdn 3pid proxy methods
2017-02-14 15:05:55 +00:00
Kegan Dougal
d0497425f8
Ordering is important on errbacks so add the cleanup func before creating an ObservableDeferred
2017-02-13 13:49:44 +00:00
Kegan Dougal
808ddf0ae7
Pop the txn from the map in case it has already been deleted somehow
2017-02-13 13:36:15 +00:00
Kegan Dougal
feb15dc99f
Don't cache errors at all
2017-02-13 13:33:12 +00:00
Kegan Dougal
ecd7e36047
http txns: Do not cache error responses
...
Previously we did. This meant that, amongst other errors, rate-limiting errors
would be cached and prevent messages with that txn ID being sent.
2017-02-13 13:16:48 +00:00
Erik Johnston
af6da6db2d
Merge pull request #1784 from morteza-araby/user-admin
...
Administration functionalities
2017-02-06 16:21:10 +01:00
Erik Johnston
6826593b81
sets aren't JSON serializable
2017-02-02 14:55:54 +00:00
Morteza Araby
2849d3f29d
admin,storage: added more administrator functionalities
...
administrators can now:
- Set displayname of users
- Update user avatars
- Search for users by user_id
- Browse all users in a paginated API
- Reset user passwords
- Deactivate users
Helpers for doing paginated queries has also been added to storage
Signed-off-by: Morteza Araby <morteza.araby@ericsson.com>
2017-02-02 14:02:26 +01:00
Erik Johnston
51adaac953
Fix email push in pusher worker
...
This was broken when device list updates were implemented, as Mailer
could no longer instantiate an AuthHandler due to a dependency on
federation sending.
2017-02-02 10:53:36 +00:00
Erik Johnston
7e919bdbd0
Include newly joined users in /keys/changes API
2017-02-01 17:33:16 +00:00
Erik Johnston
73d676dc8b
Comment
2017-02-01 13:17:17 +00:00
Erik Johnston
acb501c46d
Comment
2017-02-01 10:32:49 +00:00
Erik Johnston
97479d0c54
Implement /keys/changes
2017-02-01 10:30:03 +00:00
Erik Johnston
2367c5568c
Add basic implementation of local device list changes
2017-01-25 14:27:27 +00:00
Marvin Steadfast
1e38be3a7a
Added username and password for turn server
...
It makes it possible to use a turn server that needs a username and
password instead of a token.
2017-01-19 14:08:20 +01:00
David Baker
8c5009b628
Lowercase all email addresses before querying db
...
Since we store all emails in the DB in lowercase
(https://github.com/matrix-org/synapse/pull/1170 )
2017-01-18 13:25:56 +00:00
Erik Johnston
ebf94aff8d
Fix spurious Unhandled Error log lines
2017-01-12 17:19:47 +00:00
Mark Haines
32019c9897
Log which files we saved attachments to in the media_repository
2017-01-10 14:19:50 +00:00
Erik Johnston
7d0981b312
Merge pull request #1787 from matrix-org/erikj/linearize_member
...
Linearize updates to membership via PUT /state/
2017-01-10 14:04:54 +00:00
Erik Johnston
6823fe5241
Linearize updates to membership via PUT /state/
2017-01-09 18:25:13 +00:00
Erik Johnston
f7085ac84f
Name linearizer's for better logs
2017-01-09 17:17:10 +00:00
David Baker
0c88ab1844
Add /account/3pid/delete endpoint
...
Also fix a typo in a comment
2016-12-20 18:27:30 +00:00
Marcin Bachry
24c16fc349
Fix crash in url preview when html tag has no text
...
Signed-off-by: Marcin Bachry <hegel666@gmail.com>
2016-12-14 22:38:18 +01:00
Erik Johnston
1574b839e0
Merge pull request #1676 from matrix-org/erikj/room_list
...
Add new API appservice specific public room list
2016-12-12 17:00:10 +00:00
Richard van der Hoff
abed247182
Remove unspecced GET endpoints for e2e keys
...
GET /keys/claim is a terrible idea, since it isn't idempotent; also it throws
500 errors if you call it without all the right params.
GET /keys/query is arguable, but it's unspecced, so let's get rid of it too to
stop people relying on unspecced APIs.
2016-12-12 12:31:40 +00:00
Erik Johnston
52d12ca782
Add /room/<room_id>/joined_members API
...
This returns the currently joined members in the room with their display
names and avatar urls. This is more efficient than /members for large
rooms where you don't need the full events.
2016-12-08 13:32:07 +00:00
Erik Johnston
de796f27e6
Add joined_rooms servlet
2016-12-08 11:39:03 +00:00
Erik Johnston
f32fb65552
Add new API appservice specific public room list
2016-12-06 16:12:27 +00:00
Johannes Löthberg
32c8b5507c
preview_url_resource: Ellipsis must be in unicode string
...
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2016-12-01 13:12:13 +01:00
Richard van der Hoff
6841d8ff55
Fix doc-string
...
Remove refresh_token reference
2016-12-01 11:42:17 +00:00
Richard van der Hoff
aa09d6b8f0
Rip out more refresh_token code
...
We might as well treat all refresh_tokens as invalid. Just return a 403 from
/tokenrefresh, so that we don't have a load of dead, untestable code hanging
around.
Still TODO: removing the table from the schema.
2016-11-30 17:40:18 +00:00
Richard van der Hoff
dc4b23e1a1
Merge branch 'develop' into rav/no_more_refresh_tokens
2016-11-30 17:10:04 +00:00
Richard van der Hoff
321fe5c44c
Merge pull request #1656 from matrix-org/rav/remove_time_caveat
...
Stop putting a time caveat on access tokens
2016-11-30 16:53:20 +00:00
Richard van der Hoff
77eca2487c
Merge pull request #1653 from matrix-org/rav/guest_e2e
...
Implement E2E for guests
2016-11-29 17:41:35 +00:00
Richard van der Hoff
1c4f05db41
Stop putting a time caveat on access tokens
...
The 'time' caveat on the access tokens was something of a lie, since we weren't
enforcing it; more pertinently its presence stops us ever adding useful time
caveats.
Let's move in the right direction by not lying in our caveats.
2016-11-29 16:49:41 +00:00
Richard van der Hoff
5c4edc83b5
Stop generating refresh tokens
...
Since we're not doing refresh tokens any more, we should start killing off the
dead code paths. /tokenrefresh itself is a bit of a thornier subject, since
there might be apps out there using it, but we can at least not generate
refresh tokens on new logins.
2016-11-28 10:13:01 +00:00
Richard van der Hoff
f62b69e32a
Allow guest access to endpoints for E2E
...
Expose /devices, /keys, and /sendToDevice to guest users, so that they can use
E2E.
2016-11-25 15:26:34 +00:00
Richard van der Hoff
7f02e4d008
Give guest users a device_id
...
We need to create devices for guests so that they can use e2e, but we don't
have anywhere to store it, so just use a fixed one.
2016-11-25 15:25:30 +00:00
Erik Johnston
feec718265
Shuffle receipt handler around so that worker apps don't need to load it
2016-11-23 15:14:24 +00:00
Kegsay
d4a459f7cb
Merge pull request #1638 from matrix-org/kegan/sync-event-fields
...
Implement "event_fields" in filters
2016-11-22 14:02:38 +00:00
Kegan Dougal
cea4e4e7b2
Glue only_event_fields into the sync rest servlet
2016-11-22 10:14:05 +00:00
Mark Haines
a289150943
Fix flake8
2016-11-18 17:15:02 +00:00
David Baker
544722bad2
Work around client replacing reg params
...
Works around https://github.com/vector-im/vector-android/issues/715
and equivalent for iOS
2016-11-18 17:07:35 +00:00
Kegan Dougal
3991b4cbdb
Clean transactions based on time. Add HttpTransactionCache tests.
2016-11-14 11:19:24 +00:00
Kegan Dougal
af4a1bac50
Move .observe() up to the cache to make things neater
2016-11-14 09:52:41 +00:00
Kegan Dougal
8ecaff51a1
Review comments
2016-11-11 17:47:03 +00:00
Kegan Dougal
f6c48802f5
More flake8
2016-11-11 15:08:24 +00:00
Kegan Dougal
a88bc67f88
Flake8 and fix whoopsie
2016-11-11 15:02:29 +00:00
Kegan Dougal
42c43cfafd
Use ObservableDeferreds instead of Deferreds as they behave as intended
2016-11-11 14:54:10 +00:00
Kegan Dougal
c7daf3136c
Use observable deferreds because they are sane
2016-11-11 14:13:32 +00:00
Kegan Dougal
8a8ad46f48
Flake8
2016-11-10 15:22:11 +00:00
Kegan Dougal
2771447c29
Store Promise<Response> instead of Response for HTTP API transactions
...
This fixes a race whereby:
- User hits an endpoint.
- No cached transaction so executes main code.
- User hits same endpoint.
- No cache transaction so executes main code.
- Main code finishes executing and caches response and returns.
- Main code finishes executing and caches response and returns.
This race is common in the wild when Synapse is struggling under load.
This commit fixes the race by:
- User hits an endpoint.
- Caches the promise to execute the main code and executes main code.
- User hits same endpoint.
- Yields on the same promise as the first request.
- Main code finishes executing and returns, unblocking both requests.
2016-11-10 14:49:26 +00:00
Mark Haines
b1c27975d0
Set CORs headers on responses from the media repo
2016-11-02 11:29:25 +00:00
Erik Johnston
78c083f159
Merge pull request #1164 from pik/error-codes
...
Clarify Error codes for GET /filter/
2016-10-19 14:26:17 +01:00
pik
e8b1d2a452
Refactor test_filter to use real DataStore
...
* add tests for filter api errors
2016-10-18 12:17:38 -05:00
Alexander Maznev
d9350b0db8
Error codes for filters
...
* add tests
Signed-off-by: Alexander Maznev <alexander.maznev@gmail.com>
2016-10-14 10:18:28 -05:00
Richard van der Hoff
f7aed3d7a2
Merge pull request #1168 from matrix-org/rav/ui_auth_on_device_delete
...
User-interactive auth on delete device
2016-10-13 09:38:41 +01:00
Richard van der Hoff
9009143fb9
Handle delete device requests with no body
...
We should probably return a 401 rather than a 400 for existing clients that
don't know they have to do the UIA dance to delete a device.
2016-10-12 18:47:28 +01:00
Richard van der Hoff
fbd3866bc6
User-interactive auth on delete device
2016-10-12 16:16:31 +01:00
Mark Haines
9e18e0b1cb
Merge pull request #1167 from matrix-org/markjh/fingerprints
...
Add config option for adding additional TLS fingerprints
2016-10-12 15:27:44 +01:00
Mark Haines
0af6213019
Improve comment formatting
2016-10-12 14:45:13 +01:00
Mark Haines
6e9f3ab415
Add config option for adding additional TLS fingerprints
2016-10-11 19:14:46 +01:00
Erik Johnston
a2f2516199
Merge pull request #1157 from Rugvip/nolimit
...
Remove rate limiting from app service senders and fix get_or_create_user requester
2016-10-11 11:20:54 +01:00
Patrik Oldsberg
7b5546d077
rest/client/v1/register: use the correct requester in createUser
...
Signed-off-by: Patrik Oldsberg <patrik.oldsberg@ericsson.com>
2016-10-06 22:12:32 +02:00
Richard van der Hoff
f382117852
window.postmessage for Interactive Auth fallback
...
If you're a webapp running the fallback in an iframe, you can't set set a
window.onAuthDone function. Let's post a message back to window.opener instead.
2016-10-06 18:16:59 +01:00
Patrik Oldsberg
9bfc617791
storage/appservice: make appservice methods only relying on the cache synchronous
2016-10-06 15:24:59 +02:00
Erik Johnston
22578545a0
Time out typing over federation
2016-09-23 14:00:52 +01:00
Erik Johnston
87528f0756
Support /initialSync in synchrotron worker
2016-09-21 11:46:28 +01:00
Erik Johnston
ddc89df89d
Enable guest access to POST /publicRooms
2016-09-17 15:55:24 +01:00
Erik Johnston
2e67cabd7f
Make POST /publicRooms require auth
2016-09-16 11:32:51 +01:00
Erik Johnston
c33b25fd8d
Change the way we calculate new_limit in /publicRooms and add POST API
2016-09-15 17:35:20 +01:00
Erik Johnston
68c1ed4d1a
Remove default public rooms limit
2016-09-15 13:56:20 +01:00
Erik Johnston
1d98cf26be
By default limit /publicRooms to 100 entries
2016-09-15 13:18:35 +01:00
Erik Johnston
5810cffd33
Pass since/from parameters over federation
2016-09-15 10:36:19 +01:00
Erik Johnston
f3eead0660
Allow paginating both forwards and backwards
2016-09-15 10:15:37 +01:00
Erik Johnston
4131381123
Remove support for aggregate room lists
2016-09-15 09:28:15 +01:00
Mark Haines
18ab019a4a
Move the E2E key handling into the e2e handler
2016-09-13 11:35:35 +01:00
Mark Haines
949c2c5435
Add a timeout parameter for end2end key queries.
...
Add a timeout parameter for controlling how long synapse will wait
for responses from remote servers. For servers that fail include how
they failed to make it easier to debug.
Fetch keys from different servers in parallel rather than in series.
Set the default timeout to 10s.
2016-09-12 18:17:09 +01:00
Shell Turner
29205e9596
Conform better to the CAS protocol specification
...
Redirect to CAS's /login endpoint properly, and
don't require an <attributes> element.
Signed-off-by: Shell Turner <cam.turn@gmail.com>
2016-09-09 21:20:14 +01:00
Mark Haines
dbff7e9436
Merge pull request #1096 from matrix-org/markjh/get_access_token
...
Add helper function for getting access_tokens from requests
2016-09-09 17:09:27 +01:00
Mark Haines
8aee5aa068
Add helper function for getting access_tokens from requests
...
Rather than reimplementing the token parsing in the various places.
This will make it easier to change the token parsing to allow access_tokens
in HTTP headers.
2016-09-09 16:33:15 +01:00
Paul Evans
56f38d1776
Merge pull request #1091 from matrix-org/paul/third-party-lookup
...
Improvements to 3PE lookup API
2016-09-09 15:43:11 +01:00
Paul "LeoNerd" Evans
d271383e63
Filter returned events for client-facing format
2016-09-09 14:40:15 +01:00
Paul "LeoNerd" Evans
0fc0a3bdff
Allow clients to specify the format a room state event is returned in
2016-09-09 14:34:29 +01:00
Paul "LeoNerd" Evans
bdbcfc2a80
appease pep8
2016-09-09 13:31:39 +01:00
Paul "LeoNerd" Evans
6eb0c8a2e4
Python isn't JavaScript; have to quote dict keys
2016-09-09 13:31:17 +01:00
Paul "LeoNerd" Evans
25eb769b26
Efficiency fix for lookups of a single protocol
2016-09-09 13:25:02 +01:00
Paul "LeoNerd" Evans
3328428d05
Allow lookup of a single 3PE protocol query metadata
2016-09-09 13:19:04 +01:00
Matthew Hodgson
b8f84f99ff
Merge pull request #1081 from matrix-org/dbkr/notifications_only_highlight
...
Implement `only=highlight` on `/notifications`
2016-09-09 00:09:51 +01:00
Erik Johnston
257025ac89
Merge pull request #1082 from matrix-org/erikj/remote_public_rooms
...
Add server param to /publicRooms
2016-09-08 16:04:22 +01:00
Erik Johnston
3f9889bfd6
Use parse_string
2016-09-08 15:51:10 +01:00
Mark Haines
fa9d36e050
Merge branch 'develop' into markjh/direct_to_device_federation
2016-09-08 13:43:43 +01:00
David Baker
4ef222ab61
Implement only=highlight
on /notifications
2016-09-08 13:43:35 +01:00
Erik Johnston
791658b576
Add server param to /publicRooms
2016-09-08 11:53:05 +01:00
Mark Haines
d4a35ada28
Send device messages over federation
2016-09-06 18:16:20 +01:00
Erik Johnston
d51b8a1674
Add quotes and be explicity about script-src
2016-09-05 17:35:01 +01:00
Erik Johnston
662b031a30
Allow PDF to be rendered from media repo
2016-09-05 17:25:26 +01:00
Mark Haines
7ed5acacf4
Fix up the calls to the notifier for device messages
2016-09-01 18:08:40 +01:00
Mark Haines
1aa3e1d287
Add a replication stream for direct to device messages
2016-08-31 10:38:58 +01:00
Mark Haines
4bbef62124
Merge remote-tracking branch 'origin/develop' into markjh/direct_to_device
2016-08-26 14:35:31 +01:00
Paul "LeoNerd" Evans
1294d4a329
Move ThirdPartyEntityKind into api.constants so the expectation becomes that the value is significant
2016-08-25 18:34:47 +01:00
Mark Haines
ab34fdecb7
Merge branch 'develop' into markjh/direct_to_device
2016-08-25 18:34:46 +01:00
Mark Haines
b162cb2e41
Add some TODOs
2016-08-25 18:18:53 +01:00
Mark Haines
641efb6a39
Fix the deduplication of incoming direct-to-device messages
2016-08-25 18:14:02 +01:00
Mark Haines
e993925279
Add store-and-forward direct-to-device messaging
2016-08-25 17:35:37 +01:00
Paul Evans
d9dcb2ba3a
Merge pull request #1041 from matrix-org/paul/third-party-lookup
...
Extend 3PE lookup APIs for metadata query
2016-08-25 17:06:53 +01:00
Paul "LeoNerd" Evans
8e1ed09dff
Move static knowledge of protocol metadata into AS handler; cache the result
2016-08-24 13:01:53 +01:00
Paul "LeoNerd" Evans
965f33c901
Declare 'gitter' known protocol, with user lookup
2016-08-24 12:34:03 +01:00
Paul "LeoNerd" Evans
9899824b85
Initial hack at the 3PN protocols metadata lookup API
2016-08-24 12:33:01 +01:00
Erik Johnston
9219139351
Preserve some logcontexts
2016-08-24 11:58:40 +01:00
Paul "LeoNerd" Evans
63c19e1df9
Move 3PU/3PL lookup APIs into /thirdparty containing entity
2016-08-24 11:55:57 +01:00
Kegan Dougal
4b31426a02
Pass through user-supplied content in /join/$room_id
...
It was always intended to allow custom keys on the join event, but this has
at some point been lost. Restore it.
If the user specifies keys like "avatar_url" then they will be clobbered.
2016-08-23 16:32:04 +01:00
Matthew Hodgson
6e80c03d45
Merge branch 'develop' into dbkr/notifications_api
2016-08-20 00:16:18 +01:00
David Baker
0acdd0f1ea
Use tuple comparison
...
Hopefully easier to read
2016-08-18 17:51:08 +01:00
Paul "LeoNerd" Evans
b515f844ee
Avoid so much copypasta between 3PU and 3PL query by unifying around a ThirdPartyEntityKind enumeration
2016-08-18 17:19:55 +01:00
David Baker
602c84cd9c
Merge remote-tracking branch 'origin/develop' into dbkr/notifications_api
2016-08-18 17:15:26 +01:00
Paul "LeoNerd" Evans
105ff162d4
Authenticate 3PE lookup requests
2016-08-18 16:19:23 +01:00
Paul "LeoNerd" Evans
06964c4a0a
Copypasta the 3PU support code to also do 3PL
2016-08-18 16:09:50 +01:00
Paul "LeoNerd" Evans
f3afd6ef1a
Remove TODO note about request fields being strings - they're always strings
2016-08-18 15:53:01 +01:00
Paul "LeoNerd" Evans
d5bf7a4a99
Merge remote-tracking branch 'origin/develop' into paul/thirdpartylookup
2016-08-18 14:21:01 +01:00
Paul "LeoNerd" Evans
3856582741
Ensure that 3PU lookup request fields actually get passed in
2016-08-18 14:06:02 +01:00
Erik Johnston
0af9e1a637
Set Content-Security-Policy
on media repo
...
This is to inform browsers that they should sandbox the returned
media. This is particularly cruical for javascript/HTML files.
2016-08-17 16:27:39 +01:00
Paul "LeoNerd" Evans
fa87c981e1
Thread 3PU lookup through as far as the AS API object; which currently noöps it
2016-08-17 16:17:28 +01:00
Erik Johnston
f90b3d83a3
Add None check to _iterate_over_text
2016-08-17 15:17:17 +01:00
Paul "LeoNerd" Evans
e3e3fbc23a
Initial empty implementation that just registers an API endpoint handler
2016-08-17 12:46:49 +01:00
Erik Johnston
109a560905
Flake8
2016-08-16 14:57:21 +01:00
Erik Johnston
48b5829aea
Fix up preview URL API. Add tests.
...
This includes:
- Splitting out methods of a class into stand alone functions, to make
them easier to test.
- Adding unit tests to split out functions, testing HTML -> preview.
- Handle the fact that elements in lxml may have tail text.
2016-08-16 14:53:24 +01:00
Erik Johnston
4e1cebd56f
Make synchrotron accept /events
2016-08-12 15:31:44 +01:00
Erik Johnston
866a5320de
Dont invoke get_handlers fromClientV1RestServlet
...
hs.get_handlers() can not be invoked from split out processes. Moving
the invocations down a level means that we can slowly split out
individual servlets.
2016-08-12 10:03:19 +01:00
David Baker
b4ecf0b886
Merge remote-tracking branch 'origin/develop' into dbkr/notifications_api
2016-08-11 14:09:13 +01:00
Will Hunt
2510db3e76
Don't change status_msg on /sync
2016-08-10 12:59:59 +01:00
Erik Johnston
fa1ce4d8ad
Don't print stack traces when failing to get remote keys
2016-08-10 10:44:37 +01:00
David Baker
cd41c6ece2
Merge pull request #995 from matrix-org/rav/clean_up_cas_login
...
Clean up CAS login code
2016-08-09 10:21:56 +01:00
Richard van der Hoff
65666fedd5
Clean up CAS login code
...
Remove some apparently unused code.
Clean up parse_cas_response, mostly to catch the exception if the CAS response
isn't valid XML.
2016-08-08 17:17:25 +01:00
Richard van der Hoff
0682ca04b3
Fix CAS login
...
Attempting to log in with CAS was giving a 500 error.
2016-08-08 17:01:30 +01:00
Erik Johnston
5bcccfde6c
Don't include html comments in description
2016-08-05 14:45:11 +01:00
Erik Johnston
b5525c76d1
Typo
2016-08-04 16:10:08 +01:00
Erik Johnston
e97648c4e2
Test summarization
2016-08-04 16:09:09 +01:00
Erik Johnston
b3682df2ca
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/xpath_fix
2016-08-04 15:29:45 +01:00
Richard van der Hoff
530bc862dc
Merge branch 'rav/null_default_device_displayname' into develop
2016-08-03 14:30:32 +01:00
Richard van der Hoff
4fec5e57be
Default device_display_name to null
...
It turns out that it's more useful to return a null device display name (and
let clients decide how to handle it: eg, falling back to device_id) than using
a constant string like "unknown device".
2016-08-03 11:53:00 +01:00
Mark Haines
921f17f938
Merge branch 'develop' into rav/refactor_device_query
2016-08-03 11:12:47 +01:00
Erik Johnston
58c9653c6b
Don't infer paragrahs from newlines
2016-08-02 18:50:24 +01:00
Erik Johnston
6b58ade2f0
Comment on why we clone
2016-08-02 18:41:22 +01:00
Erik Johnston
9e66c58ceb
Spelling.
2016-08-02 18:37:31 +01:00
Erik Johnston
f83f5fbce8
Make it actually compile
2016-08-02 18:32:42 +01:00
Erik Johnston
aecaec3e10
Change the way we summarize URLs
...
Using XPath is slow on some machines (for unknown reasons), so use a
different approach to get a list of text nodes.
Try to generate a summary that respect paragraph and then word
boundaries, adding ellipses when appropriate.
2016-08-02 18:25:53 +01:00
Richard van der Hoff
986615b0b2
Move e2e query logic into a handler
2016-08-01 18:02:07 +01:00
David Baker
271d3e7865
Fix adding emails on registration
...
Synapse was not adding email addresses to accounts registered with an email address, due to too many different variables called 'result'. Rename both of them. Also remove the defer.returnValue() with no params because that's not a thing.
2016-07-29 15:25:24 +01:00
Richard van der Hoff
f6f8f81a48
Add r0.1.0 to the "supported versions" list
2016-07-28 10:14:07 +01:00
Richard van der Hoff
fda078f995
Add r0.2.0 to the "supported versions" list
2016-07-28 09:14:21 +01:00
Richard van der Hoff
ccec25e2c6
key upload tweaks
...
1. Add v2_alpha URL back in, since things seem to be using it.
2. Don't reject the request if the device_id in the upload request fails to
match that in the access_token.
2016-07-27 16:41:06 +01:00
Richard van der Hoff
d47115ff8b
Delete e2e keys on device delete
2016-07-27 12:24:52 +01:00
Richard van der Hoff
2e3d90d67c
Make the device id on e2e key upload optional
...
We should now be able to get our device_id from the access_token, so the
device_id on the upload request is optional. Where it is supplied, we should
check that it matches.
For active access_tokens without an associated device_id, we ought to register
the device in the devices table.
Also update the table on upgrade so that all of the existing e2e keys are
associated with real devices.
2016-07-26 23:38:12 +01:00
Richard van der Hoff
eb359eced4
Add create_requester
function
...
Wrap the `Requester` constructor with a function which provides sensible
defaults, and use it throughout
2016-07-26 16:46:53 +01:00
Richard van der Hoff
012b4c1913
Implement updating devices
...
You can update the displayname of devices now.
2016-07-26 07:35:48 +01:00
Richard van der Hoff
436bffd15f
Implement deleting devices
2016-07-26 07:35:48 +01:00
David Baker
2c28e25bda
Merge pull request #943 from matrix-org/rav/get_device_api
...
Implement GET /device/{deviceId}
2016-07-21 13:41:42 +01:00
David Baker
1e6e370b76
Merge pull request #942 from matrix-org/rav/fix_register_deviceid
...
Preserve device_id from first call to /register
2016-07-21 13:16:31 +01:00
Richard van der Hoff
406f7aa0f6
Implement GET /device/{deviceId}
2016-07-21 12:00:29 +01:00
Richard van der Hoff
1a64dffb00
Preserve device_id from first call to /register
...
device_id may only be passed in the first call to /register, so make sure we
fish it out of the register `params` rather than the body of the final call.
2016-07-21 11:34:16 +01:00
Richard van der Hoff
7314bf4682
Merge branch 'develop' into rav/get_devices_api
...
(pick up PR #938 in the hope of fixing the UTs)
2016-07-20 17:40:00 +01:00
Richard van der Hoff
bc8f265f0a
GET /devices endpoint
...
implement a GET /devices endpoint which lists all of the user's devices.
It also returns the last IP where we saw that device, so there is some dancing
to fish that out of the user_ips table.
2016-07-20 16:42:32 +01:00
Richard van der Hoff
b97a1356b1
Register a device_id in the /v2/register flow.
...
This doesn't cover *all* of the registration flows, but it does cover the most
common ones: in particular: shared_secret registration, appservice
registration, and normal user/pass registration.
Pull device_id from the registration parameters. Register the device in the
devices table. Associate the device with the returned access and refresh
tokens. Profit.
2016-07-20 16:38:27 +01:00
Richard van der Hoff
c68518dfbb
Merge pull request #933 from matrix-org/rav/type_annotations
...
Type annotations
2016-07-20 12:26:32 +01:00
David Baker
e967bc86e7
Merge pull request #932 from matrix-org/rav/register_refactor
...
Further registration refactoring
2016-07-20 11:03:33 +01:00
Erik Johnston
1e2a7f18a1
Merge pull request #922 from matrix-org/erikj/file_api2
...
Feature: Add filter to /messages. Add 'contains_url' to filter.
2016-07-20 10:40:48 +01:00
Richard van der Hoff
3413f1e284
Type annotations
...
Add some type annotations to help PyCharm (in particular) to figure out the
types of a bunch of things.
2016-07-19 18:56:16 +01:00
Richard van der Hoff
40cbffb2d2
Further registration refactoring
...
* `RegistrationHandler.appservice_register` no longer issues an access token:
instead it is left for the caller to do it. (There are two of these, one in
`synapse/rest/client/v1/register.py`, which now simply calls
`AuthHandler.issue_access_token`, and the other in
`synapse/rest/client/v2_alpha/register.py`, which is covered below).
* In `synapse/rest/client/v2_alpha/register.py`, move the generation of
access_tokens into `_create_registration_details`. This means that the normal
flow no longer needs to call `AuthHandler.issue_access_token`; the
shared-secret flow can tell `RegistrationHandler.register` not to generate a
token; and the appservice flow continues to work despite the above change.
2016-07-19 18:46:19 +01:00
David Baker
b9e997f561
Merge pull request #931 from matrix-org/rav/refactor_register
...
rest/client/v2_alpha/register.py: Refactor flow somewhat.
2016-07-19 16:13:45 +01:00
Richard van der Hoff
8f6281ab0c
Don't bind email unless threepid contains expected fields
2016-07-19 15:50:01 +01:00
Richard van der Hoff
0da0d0a29d
rest/client/v2_alpha/register.py: Refactor flow somewhat.
...
This is meant to be an *almost* non-functional change, with the exception that
it fixes what looks a lot like a bug in that it only calls
`auth_handler.add_threepid` and `add_pusher` once instead of three times.
The idea is to move the generation of the `access_token` out of
`registration_handler.register`, because `access_token`s now require a
device_id, and we only want to generate a device_id once registration has been
successful.
2016-07-19 13:12:22 +01:00
Richard van der Hoff
f863a52cea
Add device_id support to /login
...
Add a 'devices' table to the storage, as well as a 'device_id' column to
refresh_tokens.
Allow the client to pass a device_id, and initial_device_display_name, to
/login. If login is successful, then register the device in the devices table
if it wasn't known already. If no device_id was supplied, make one up.
Associate the device_id with the access token and refresh token, so that we can
get at it again later. Ensure that the device_id is copied from the refresh
token to the access_token when the token is refreshed.
2016-07-18 16:39:44 +01:00
Richard van der Hoff
93efcb8526
Merge pull request #928 from matrix-org/rav/refactor_login
...
Refactor login flow
2016-07-18 16:12:35 +01:00
Richard van der Hoff
dcfd71aa4c
Refactor login flow
...
Make sure that we have the canonical user_id *before* calling
get_login_tuple_for_user_id.
Replace login_with_password with a method which just validates the password,
and have the caller call get_login_tuple_for_user_id. This brings the password
flow into line with the other flows, and will give us a place to register the
device_id if necessary.
2016-07-18 15:23:54 +01:00
Will Hunt
511a52afc8
Use body.get to check for 'user'
2016-07-16 18:44:08 +01:00
Will Hunt
e885e2a623
Fall back to 'username' if 'user' is not given for appservice reg.
2016-07-16 18:33:48 +01:00
Erik Johnston
a3036ac37e
Merge pull request #921 from matrix-org/erikj/account_deactivate
...
Feature: Add an /account/deactivate endpoint
2016-07-14 17:25:15 +01:00
Erik Johnston
a98d215204
Add filter param to /messages API
2016-07-14 16:30:56 +01:00
Erik Johnston
209e04fa11
Merge pull request #918 from negzi/bugfix_for_token_expiry
...
Bug fix: expire invalid access tokens
2016-07-14 15:51:52 +01:00
Erik Johnston
848d3bf2e1
Add hs object
2016-07-14 10:25:52 +01:00
Erik Johnston
b55c770271
Only accept password auth
2016-07-14 10:00:38 +01:00
Erik Johnston
d543b72562
Add an /account/deactivate endpoint
2016-07-14 09:56:53 +01:00
Negar Fazeli
0136a522b1
Bug fix: expire invalid access tokens
2016-07-13 15:00:37 +02:00
David Baker
c55ad2e375
be more pythonic
2016-07-12 14:15:10 +01:00
David Baker
aaa9d9f0e1
on_OPTIONS isn't neccessary
2016-07-12 14:13:14 +01:00
David Baker
75fa7f6b3c
Remove other debug logging
2016-07-12 14:08:57 +01:00
David Baker
a5db0026ed
Separate out requestTokens to separate handlers
2016-07-11 09:57:07 +01:00
David Baker
9c491366c5
Oops, remove debug logging
2016-07-11 09:07:40 +01:00
David Baker
385aec4010
Implement https://github.com/matrix-org/matrix-doc/pull/346/files
2016-07-08 17:42:48 +01:00
Erik Johnston
67f2c901ea
Add rest servlet. Fix SQL.
2016-07-06 15:56:59 +01:00
Erik Johnston
a17e7caeb7
Merge branch 'erikj/shared_secret' into erikj/test2
2016-07-06 14:46:31 +01:00
Erik Johnston
76b18df3d9
Check that there are no null bytes in user and passsword
2016-07-06 11:17:53 +01:00
Erik Johnston
0da24cac8b
Add null separator to hmac
2016-07-06 11:05:16 +01:00
Erik Johnston
651faee698
Add an admin option to shared secret registration
2016-07-05 17:30:22 +01:00
Erik Johnston
caf33b2d9b
Protect password when registering using shared secret
2016-07-05 17:18:19 +01:00
Erik Johnston
2d21d43c34
Add purge_history API
2016-07-05 10:28:51 +01:00
Kent Shikama
bb069079bb
Fix style violations
...
Signed-off-by: Kent Shikama <kent@kentshikama.com>
2016-07-04 22:07:11 +09:00
Kent Shikama
2e5a31f197
Use .get() instead of [] to access password_hash
2016-07-04 22:00:13 +09:00
Kent Shikama
fc8007dbec
Optionally include password hash in createUser endpoint
...
Signed-off-by: Kent Shikama <kent@kentshikama.com>
2016-07-03 15:08:15 +09:00
Erik Johnston
f328d95cef
Feature: Add deactivate account admin API
...
Allows server admins to "deactivate" accounts, which:
- Revokes all access tokens
- Removes all threepids
- Removes password
The API is a POST to `/admin/deactivate/<user_id>`
2016-06-30 15:40:58 +01:00
Erik Johnston
f52cb4cd78
Remove race
2016-06-29 15:24:50 +01:00
Erik Johnston
a70688445d
Implement purge_media_cache admin API
2016-06-29 14:57:59 +01:00
Erik Johnston
314b146b2e
Track approximate last access time for remote media
2016-06-29 11:41:20 +01:00
Mark Haines
13e334506c
Remove the legacy v0 content upload API.
...
The existing content can still be downloaded. The last upload to the
matrix.org server was in January 2015, so it is probably safe to remove
the upload API.
2016-06-21 11:47:39 +01:00
Erik Johnston
09a17f965c
Line lengths
2016-06-15 16:58:12 +01:00
Erik Johnston
1e9026e484
Handle floats as img widths
2016-06-15 16:58:05 +01:00
Erik Johnston
a60169ea09
Handle og props with not content
2016-06-15 16:57:48 +01:00
Erik Johnston
eba4ff1bcb
502 on /thumbnail when can't contact remote server
2016-06-09 11:29:43 +01:00
Erik Johnston
95f305c35a
Remove redundant exception log in /events
2016-06-09 11:15:04 +01:00
Erik Johnston
690029d1a3
Don't make rooms visibile by default
2016-06-08 14:47:42 +01:00
Erik Johnston
efeabd3180
Log user that is making /publicRooms calls
2016-06-08 14:23:15 +01:00
Erik Johnston
6a0afa582a
Load push rules in storage layer, so that they get cached
2016-06-03 11:10:00 +01:00
David Baker
1f31cc37f8
Working unsubscribe links going straight to the HS
...
and authed by macaroons that let you delete pushers and nothing else
2016-06-02 17:21:31 +01:00
David Baker
3a3fb2f6f9
Merge branch 'dbkr/split_out_auth_handler' into dbkr/email_unsubscribe
2016-06-02 13:35:25 +01:00
David Baker
4a10510cd5
Split out the auth handler
2016-06-02 13:31:45 +01:00
David Baker
991af8b0d6
WIP on unsubscribing email notifs without logging in
2016-06-01 17:40:52 +01:00
David Baker
d240796ded
Basic, un-cached support for secondary_directory_servers
2016-05-31 17:20:07 +01:00
David Baker
887c6e6f05
Split out the room list handler
...
So I can use it from federation bits without pulling in all the handlers.
2016-05-31 11:05:16 +01:00
David Baker
37b7e84620
Include the ts the notif was received at
2016-05-24 11:33:32 +01:00
David Baker
b791a530da
Actually make the 'read' flag correct
2016-05-23 18:48:02 +01:00
David Baker
a24bc5b2dc
Add GET /notifications API
2016-05-23 18:33:51 +01:00
Kegan Dougal
332d7e9b97
Allow clients to specify a server_name to avoid 'No known servers'
...
Multiple server_names are supported via ?server_name=foo&server_name=bar
2016-05-19 13:50:52 +01:00
Mark Haines
0cb441fedd
Move typing handler out of the Handlers object
2016-05-17 15:58:46 +01:00
Mark Haines
f68eea808a
Move SyncHandler out of the Handlers object
2016-05-16 20:19:26 +01:00
Mark Haines
3b86ecfa79
Move the presence handler out of the Handlers object
2016-05-16 18:56:37 +01:00
Mark Haines
eb79110beb
Clean up the blacklist/whitelist handling.
...
Always set the config key with an empty list, even if a list isn't specified.
This means that the codepaths are the same for both the empty list and
for a missing key. Since the behaviour is the same for both cases this
makes the code somewhat easier to reason about.
2016-05-16 13:03:59 +01:00
Negi Fazeli
40aa6e8349
Create user with expiry
...
- Add unittests for client, api and handler
Signed-off-by: Negar Fazeli <negar.fazeli@ericsson.com>
2016-05-13 15:34:15 +02:00
David Baker
997db04648
Merge remote-tracking branch 'origin/develop' into dbkr/email_notifs
2016-05-10 14:40:19 +02:00
David Baker
c00b484eff
More consistent config naming
2016-05-10 14:39:16 +02:00
David Baker
94040b0798
Add config option to not send email notifs for new users
2016-05-10 14:34:53 +02:00
Mark Haines
573ef3f1c9
Rename openid/token to openid/request_token
2016-05-05 15:15:00 +01:00
Mark Haines
9c272da05f
Add an openidish mechanism for proving to third parties that you own a given user_id
2016-05-05 13:42:44 +01:00
Erik Johnston
8e6a163f27
Add timestamp and auto incrementing ID
2016-05-04 15:19:12 +01:00
Erik Johnston
5650e38e7d
Move event_id to path
2016-05-04 13:19:39 +01:00
Erik Johnston
984d4a2c0f
Add /report endpoint
2016-05-04 11:28:10 +01:00
David Baker
2df75de505
Merge remote-tracking branch 'origin/develop' into dbkr/email_notifs
2016-04-29 20:28:47 +01:00
David Baker
dc2c527ce9
Fix password reset
...
Default requester to None, otherwise it isn't defined when resetting using email auth
2016-04-29 12:07:54 +01:00
David Baker
b2c04da8dc
Add an email pusher for new users
...
If they registered with an email address and email notifs are enabled on the HS
2016-04-29 11:43:57 +01:00
Mark Haines
8d7ad44331
Report per request metrics for all of the things using request_handler
2016-04-28 10:57:49 +01:00
Erik Johnston
52ecbc2843
Make pyjwt dependency optional
2016-04-25 14:30:15 +01:00
Erik Johnston
b9675ef6e6
Merge pull request #687 from nikriek/jwt-fix
...
Fix issues with JWT login
2016-04-21 17:42:25 +01:00
Niklas Riekenbrauck
565c2edb0a
Fix issues with JWT login
2016-04-21 18:10:48 +02:00
Erik Johnston
e8884e5e9c
Add self.media_repo to PreviewUrlResource
2016-04-19 14:51:34 +01:00
Erik Johnston
a7001c311b
_make_dirs was moved to MediaRepository
2016-04-19 14:49:31 +01:00
Erik Johnston
9181e2f4c7
Add store to PreviewUrlResource
2016-04-19 14:48:24 +01:00
Erik Johnston
fb76a81ff7
Reorder imports
2016-04-19 14:45:05 +01:00
Erik Johnston
0c93df89b6
Move MediaRepository to media_repository module
2016-04-19 11:31:43 +01:00
Erik Johnston
43f0941e8f
Split out BaseMediaResource into MediaRepository
...
This is so that a single MediaRepository can be shared across all
resources, rather than having a "copy" per resource.
In particular this allows us to guard against both the thumbnail and
download resource triggering a download of remote content at the same
time.
2016-04-19 11:24:59 +01:00
Matthew Hodgson
aaabbd3e9e
explicitly pass in the charset from Content-Type to lxml to fix cyrillic woes better
2016-04-15 14:32:25 +01:00
Matthew Hodgson
84f9cac4d0
fix cyrillic URL previews by hardcoding all page decoding to UTF-8 for now, rather than relying on lxml's heuristics which seem to get it wrong
2016-04-15 13:20:08 +01:00
Matthew Hodgson
f78b479118
fix urlparse import thinko breaking tiny URLs
2016-04-14 15:23:55 +01:00
Kegan Dougal
83776d6219
Make v2_alpha reg follow the AS API specification
...
The spec is clear the key should be 'user' not 'username' and this is indeed
the case for v1. This is not true for v2_alpha though, which is what this
commit is fixing.
2016-04-14 14:52:26 +01:00
Matthew Hodgson
bd77216d06
comment out 2c838f6459
due to risk of https://en.wikipedia.org/wiki/Billion_laughs attacks - thanks @torhve
2016-04-14 14:39:24 +01:00
Erik Johnston
d0633e6dbe
Sanitize the optional dependencies for spider API
2016-04-13 13:38:09 +01:00
David Baker
a04c076b7f
Make the /set part mandatory
2016-04-12 13:54:41 +01:00
David Baker
7b39bcdaae
Mis-named function
2016-04-12 13:35:08 +01:00
David Baker
d937f342bb
Split into separate servlet classes
2016-04-12 13:33:30 +01:00
David Baker
8a76094965
Add get endpoint for pushers
...
As per https://github.com/matrix-org/matrix-doc/pull/308
2016-04-11 18:00:03 +01:00
Erik Johnston
17515bae14
PEP8
2016-04-11 11:02:50 +01:00
Matthew Hodgson
5ffacc5e84
fix typos and needless try/except from PR review
2016-04-11 10:39:16 +01:00
Matthew Hodgson
83b2f83da0
actually throw meaningful errors
2016-04-08 21:36:59 +01:00
Mark Haines
b36270b5e1
Fix pep8 warning
2016-04-08 19:52:23 +01:00
Matthew Hodgson
1ccabe2965
more PR feedback
2016-04-08 18:58:08 +01:00
Matthew Hodgson
dafef5a688
Add url_preview_enabled config option to turn on/off preview_url endpoint. defaults to off.
...
Add url_preview_ip_range_blacklist to let admins specify internal IP ranges that must not be spidered.
Add url_preview_url_blacklist to let admins specify URL patterns that must not be spidered.
Implement a custom SpiderEndpoint and associated support classes to implement url_preview_ip_range_blacklist
Add commentary and generally address PR feedback
2016-04-08 18:37:15 +01:00
Matthew Hodgson
9f7dc2bef7
Merge branch 'develop' into matthew/preview_urls
2016-04-04 00:38:21 +01:00
Matthew Hodgson
cf51c4120e
report image size (bytewise) in OG meta
2016-04-03 23:57:05 +01:00
Matthew Hodgson
0834b152fb
char encoding
2016-04-03 12:59:27 +01:00
Matthew Hodgson
8b98a7e8c3
pep8
2016-04-03 12:56:29 +01:00
Matthew Hodgson
eab4d462f8
fix etag typing error. fix timestamp typing error
2016-04-03 02:02:46 +01:00
Matthew Hodgson
c3916462f6
rebase all image URLs
2016-04-03 01:33:12 +01:00
Matthew Hodgson
110780b18b
remove stale todo
2016-04-03 00:48:31 +01:00
Matthew Hodgson
b09e29a03c
Ensure only one download for a given URL is active at a time
2016-04-03 00:47:40 +01:00
Matthew Hodgson
7426c86eb8
add a persistent cache of URL lookups, and fix up the in-memory one to work
2016-04-03 00:31:57 +01:00
Matthew Hodgson
d1b154a10f
support gzip compression, and don't pass through error msgs
2016-04-02 03:06:39 +01:00
Matthew Hodgson
9377157961
how was _respond_default_thumbnail ever meant to work?
2016-04-02 02:31:45 +01:00
Matthew Hodgson
2c838f6459
pass back SVGs as their own thumbnails
2016-04-02 02:30:07 +01:00
Matthew Hodgson
5037ee0d37
handle missing dimensions without crashing
2016-04-02 02:29:57 +01:00
Matthew Hodgson
b26e8604f1
make meta comparisons case insensitive
2016-04-02 01:35:44 +01:00
Matthew Hodgson
5fd07da764
refactor calc_og; spider image URLs; fix xpath; add a (broken) expiringcache; loads of other fixes
2016-04-02 00:35:49 +01:00
Mark Haines
2a37467fa1
Use google style doc strings.
...
pycharm supports them so there is no need to use the other format.
Might as well convert the existing strings to reduce the risk of
people accidentally cargo culting the wrong doc string format.
2016-04-01 16:12:07 +01:00
Matthew Hodgson
c60b751694
fix assorted redirect, unicode and screenscraping bugs
2016-04-01 02:17:48 +01:00
Matthew Hodgson
683e564815
handle spidered relative images correctly
2016-03-31 23:52:58 +01:00
Matthew Hodgson
72550c3803
prevent choking on invalid utf-8, and handle image thumbnailing smarter
2016-03-31 15:14:14 +01:00
Matthew Hodgson
bb9a2ca87c
synthesise basig OG metadata from pages lacking it
2016-03-31 14:15:09 +01:00
Matthew Hodgson
a8a5dd3b44
handle requests with missing content-length headers (e.g. YouTube)
2016-03-31 01:55:21 +01:00
Erik Johnston
08a8514b7a
Remove spurious comment
2016-03-30 15:05:33 +01:00
Erik Johnston
fddb6fddc1
Require user to have left room to forget room
...
This dramatically simplifies the forget API code - in particular it no
longer generates a leave event.
2016-03-30 11:03:00 +01:00
Niklas Riekenbrauck
3f9948a069
Add JWT support
2016-03-29 14:36:36 +02:00
Matthew Hodgson
ae5831d303
fix bugs
2016-03-29 03:32:55 +01:00
Matthew Hodgson
19038582d3
debug
2016-03-29 03:14:16 +01:00
Matthew Hodgson
64b4aead15
make it work
2016-03-29 03:13:25 +01:00
Matthew Hodgson
dd4287ca5d
make it build
2016-03-29 02:07:57 +01:00
Matthew Hodgson
e0c2490a14
Merge branch 'develop' into matthew/preview_urls
2016-03-29 01:20:25 +01:00
Matthew Hodgson
d9d48aad2d
Merge branch 'develop' into matthew/preview_urls
2016-03-27 22:54:42 +01:00
Mark Haines
191c7bef6b
Deduplicate identical /sync requests
2016-03-24 17:47:31 +00:00
Erik Johnston
3e7fac0d56
Add published room list edit API
2016-03-21 15:06:07 +00:00
Erik Johnston
916227b4df
Merge pull request #652 from matrix-org/erikj/delete_alias
...
Update aliases event after deletion
2016-03-18 14:02:46 +00:00
Erik Johnston
2cd9260500
Update aliases event after deletion
...
Attempt to update the appropriate `m.room.aliases` event after deleting
an alias. This may fail due to the deleter not being in the room.
Will also check if the canonical alias of the event is set to the
deleted alias, and if so will attempt to delete it.
2016-03-17 11:42:00 +00:00
David Baker
5670205e2a
remove debug logging
2016-03-16 19:49:42 +00:00
David Baker
f984decd66
Unused import
2016-03-16 19:40:48 +00:00
David Baker
a7daa5ae13
Make registration idempotent, part 2: be idempotent if the client specifies a username.
2016-03-16 19:36:57 +00:00
David Baker
f5e90422f5
take extra return val from check_auth in account too
2016-03-16 14:33:19 +00:00
David Baker
99797947aa
pep8 & remove debug logging
2016-03-16 12:51:34 +00:00
David Baker
c12b9d719a
Make registration idempotent: if you specify the same session, make it give you an access token for the user that was registered on previous uses of that session. Tweak the UI auth layer to not delete sessions when their auth has completed and hence expire themn so they don't hang around until server restart. Allow server-side data to be associated with UI auth sessions.
2016-03-16 11:56:24 +00:00
Mark Haines
12904932c4
Hook up adding a pusher to the notifier for replication.
2016-03-15 17:42:03 +00:00
Mark Haines
398cd1edfb
Fix regression where synapse checked whether push rules were valid JSON before the compatibility hack that handled clients sending invalid JSON
2016-03-14 14:16:41 +00:00
Erik Johnston
494d0c8e02
Merge pull request #642 from matrix-org/erikj/logout
...
Implement logout
2016-03-11 20:16:25 +00:00
Mark Haines
e9c1cabac2
Use parse_json_object_from_request to parse JSON out of request bodies
2016-03-11 16:41:03 +00:00
Erik Johnston
b13035cc91
Implement logout
2016-03-11 16:27:50 +00:00
David Baker
aa11db5f11
Fix cache invalidation so deleting access tokens (which we did when changing password) actually takes effect without HS restart. Reinstate the code to avoid logging out the session that changed the password, removed in 415c2f0549
2016-03-11 13:14:18 +00:00
blide
40160e24ab
Register endpoint returns refresh_token
...
Guest registration still doesn't return refresh_token
2016-03-10 10:29:19 +03:00
Mark Haines
b7dbe5147a
Add a parse_json_object function
...
to deduplicate all the copy+pasted _parse_json functions. Also document
the parse_.* functions.
2016-03-09 11:26:26 +00:00
Mark Haines
7076082ae6
Fix relative imports so they work in both py3 and py27
2016-03-08 11:45:50 +00:00
Mark Haines
239badea9b
Use syntax that works on both py2.7 and py3
2016-03-07 20:13:10 +00:00
Mark Haines
ec7460b4f2
Merge branch 'develop' into markjh/pushrule_stream
2016-03-04 14:44:34 +00:00
Mark Haines
1b4f4a936f
Hook up the push rules stream to account_data in /sync
2016-03-04 14:44:01 +00:00
Erik Johnston
dd463e246d
Merge pull request #614 from matrix-org/erikj/alias_delete
...
Allow alias creators to delete aliases
2016-03-04 09:02:33 +00:00
Daniel Wagner-Hall
b4022cc487
Pass whole requester to ratelimiting
...
This will enable more detailed decisions
2016-03-03 16:43:42 +00:00
Mark Haines
3406eba4ef
Move the code for formatting push rules into a separate function
2016-03-03 16:11:59 +00:00
Mark Haines
ddf9e7b302
Hook up the push rules to the notifier
2016-03-03 14:57:45 +00:00
Erik Johnston
f9af8962f8
Allow alias creators to delete aliases
2016-03-01 14:46:31 +00:00
Mark Haines
de27f7fc79
Add support for changing the actions for default rules
...
See matrix-org/matrix-doc#283
Works by adding dummy rules to the push rules table with a negative priority class and then using those rules to clobber the default rule actions when adding the default rules in ``list_with_base_rules``
2016-02-26 14:28:19 +00:00
Gergely Polonkai
87acd8fb07
Fix to appease the PEP8 dragon
2016-02-26 12:05:38 +01:00
Gergely Polonkai
a53774721a
Add error codes for malformed/bad JSON in /login
...
Signed-off-by: Gergely Polonkai <gergely@polonkaieu>
2016-02-26 10:22:35 +01:00
Mark Haines
15c2ac2cac
Make sure we return a JSON object when returning the values of specif…
...
…ic keys from a push rule
2016-02-25 15:13:07 +00:00
Mark Haines
9892d017b2
Remove unused get_rule_attr method
2016-02-24 16:31:07 +00:00
Daniel Wagner-Hall
869580206d
Ignore invalid POST bodies when joining rooms
2016-02-24 08:50:28 +00:00
Daniel Wagner-Hall
577951b032
Allow third_party_signed to be specified on /join
2016-02-23 15:11:25 +00:00
Erik Johnston
e5ad2e5267
Merge pull request #582 from matrix-org/erikj/presence
...
Rewrite presence for performance.
2016-02-19 09:37:50 +00:00
Erik Johnston
e12ec335a5
"You are not..."
2016-02-18 17:01:53 +00:00
Mark Haines
b9977ea667
Remove dead code for setting device specific rules.
...
It wasn't possible to hit the code from the API because of a typo
in parsing the request path. Since no-one was using the feature
we might as well remove the dead code.
2016-02-18 16:05:13 +00:00
Daniel Wagner-Hall
7e90fb6a57
Merge branch 'develop' into daniel/roomcleanupincremental
...
Conflicts:
synapse/rest/client/v1/room.py
2016-02-17 15:53:59 +00:00
Daniel Wagner-Hall
591af2d074
Some cleanup
...
I'm not particularly happy with the "action" switching, but there's no
convenient way to defer the work that needs to happen after it, so... :(
2016-02-17 15:50:13 +00:00
Erik Johnston
e5999bfb1a
Initial cut
2016-02-17 15:40:50 +00:00
Patrik Oldsberg
71d5d2c669
client/v1/room: include event_id in response to state event PUT, in accordance with the spec
...
Signed-off-by: Patrik Oldsberg <patrik.oldsberg@ericsson.com>
2016-02-17 11:53:43 +01:00
Mark Haines
458782bf67
Fix typo in request validation for adding push rules.
2016-02-16 18:00:30 +00:00
Daniel Wagner-Hall
4bfb32f685
Branch off member and non member sends
...
Unclean, needs tidy-up, but works
2016-02-15 18:21:30 +00:00
Daniel Wagner-Hall
1a2197d7bf
Simplify room creation code
2016-02-15 18:19:01 +00:00
Daniel Wagner-Hall
e560045cfd
Simplify room creation code
2016-02-15 18:18:39 +00:00
Daniel Wagner-Hall
150fcde0dc
Reuse update_membership from /join
2016-02-15 16:16:03 +00:00
Daniel Wagner-Hall
e71095801f
Merge implementation of /join by alias or ID
...
This code is kind of rough (passing the remote servers down a long
chain), but is a step towards improvement.
2016-02-15 15:39:16 +00:00
Daniel Wagner-Hall
dbeed36dec
Merge some room joining codepaths
...
Force joining by alias to go through the send_membership_event checks,
rather than bypassing them straight into _do_join. This is the first of
many stages of cleanup.
2016-02-15 14:38:27 +00:00
Daniel Wagner-Hall
4de08a4672
Revert "Merge two of the room join codepaths"
...
This reverts commit cf81375b94
.
It subtly violates a guest joining auth check
2016-02-12 16:17:24 +00:00
Daniel Wagner-Hall
cf81375b94
Merge two of the room join codepaths
...
There's at least one more to merge in.
Side-effects:
* Stop reporting None as displayname and avatar_url in some cases
* Joining a room by alias populates guest-ness in join event
* Remove unspec'd PUT version of /join/<room_id_or_alias> which has not
been called on matrix.org according to logs
* Stop recording access_token_id on /join/room_id - currently we don't
record it on /join/room_alias; I can try to thread it through at some
point.
2016-02-12 15:11:49 +00:00
Mark Haines
58c9f20692
Catch the exceptions thrown by twisted when you write to a closed connection
2016-02-12 13:46:59 +00:00
Erik Johnston
a1b7902944
Add some paranoia logging
2016-02-11 09:22:37 +00:00
Daniel Wagner-Hall
ebaa999f92
Revert "Reject additional path segments"
...
This reverts commit 1d19a5ec0f
.
iOS Console is apparently relying on these paths.
2016-02-09 12:46:52 +00:00
Erik Johnston
2bb5f035af
Merge pull request #564 from matrix-org/erikj/logcontext
...
Fix up logcontexts
2016-02-08 15:16:16 +00:00
Erik Johnston
2c1fbea531
Fix up logcontexts
2016-02-08 14:26:45 +00:00
Daniel Wagner-Hall
1d19a5ec0f
Reject additional path segments
2016-02-08 10:50:55 +00:00
David Baker
34dda7cc7f
Merge pull request #557 from matrix-org/dbkr/profile_dont_return_null
...
Omit keys rather then returning null in profile API
2016-02-04 15:39:12 +00:00
Erik Johnston
709e09e1c3
Remove old log line
2016-02-03 16:32:20 +00:00
Erik Johnston
33c71c3a4b
Preserve log context over when deferring to thread pool in media repo
2016-02-03 16:17:18 +00:00
David Baker
156cea5b45
No braces here
2016-02-03 15:04:51 +00:00
David Baker
24277fbb97
Don't return null if profile display name / avatar url isn't set: omit them instead
2016-02-03 14:59:19 +00:00
Daniel Wagner-Hall
5054806ec1
Rename config field to reflect yaml name
2016-02-03 14:42:01 +00:00
Daniel Wagner-Hall
d83d004ccd
Fix flake8 warnings for new flake8
2016-02-02 17:18:50 +00:00
Erik Johnston
04ad93e6fd
Merge pull request #545 from matrix-org/erikj/sync
...
Move /sync state calculations from rest to handler
2016-02-02 15:28:43 +00:00
David Baker
d7ac861d3b
Pull guest access token out of the auth session params, otherwise it will break if you open the email on a different device.
2016-02-01 16:33:19 +00:00
Erik Johnston
fa48020a52
Move state calculations from rest to handler
2016-02-01 15:59:40 +00:00
Mark Haines
5687a00e4e
Allow three_pid_creds as well as threePidCreds in /account/3pid
2016-01-29 13:26:15 +00:00
Mark Haines
8c94833b72
Fix adding push rules relative to other rules
2016-01-27 10:24:20 +00:00
Mark Haines
7179fdd550
Merge pull request #528 from matrix-org/markjh/missing_yield
...
Add missing yield in push_rules set enabled
2016-01-25 21:26:30 +01:00
Mark Haines
e18257f0e5
Add missing yield in push_rules set enabled
2016-01-25 16:51:56 +00:00
Erik Johnston
4021f95261
Move logic from rest/ to handlers/
2016-01-25 10:10:44 +00:00
Matthew Hodgson
7dd0c1730a
initial WIP of a tentative preview_url endpoint - incomplete, untested, experimental, etc. just putting it here for safekeeping for now
2016-01-24 18:47:27 -05:00
Erik Johnston
975903ae17
Sanitize filters
2016-01-22 10:41:30 +00:00
Erik Johnston
c43b6dcc75
Fix change_password
2016-01-20 16:14:48 +00:00
Erik Johnston
73ca8e5834
Whine if we give a from param to /sync
2016-01-20 15:42:57 +00:00
Daniel Wagner-Hall
da417aa56d
Allow non-guests to peek on rooms using /events
2016-01-20 15:34:07 +00:00
Erik Johnston
ac2842ff1e
Only compute unread notifications for rooms we send down stream
2016-01-19 17:19:53 +00:00
Erik Johnston
3adcc4c86a
Return highlight_count in /sync
2016-01-19 11:35:50 +00:00
Erik Johnston
0d241e1114
Take a deepcopy of push rules before mutating them
2016-01-19 10:15:12 +00:00
Erik Johnston
d1f56f732e
Use static for const dicts
2016-01-18 15:17:56 +00:00
Erik Johnston
0e39dcd135
Remove internal ids
2016-01-18 14:50:17 +00:00
Daniel Wagner-Hall
ac5a4477ad
Require unbanning before other membership changes
2016-01-15 16:27:26 +00:00
Richard van der Hoff
2978053d16
Merge branch 'release-v0.12.1' into develop
2016-01-14 15:04:08 +00:00
David Baker
a7927c13fd
Fix enabling & disabling push rules
2016-01-14 10:53:44 +00:00
Richard van der Hoff
49f33f6438
Add 'event' result to 'context' endpoint
...
... because the context isn't much use without the event.
2016-01-13 16:42:14 +00:00
Mark Haines
9c1f853d58
Rename 'user_name' to 'user_id' in push to make it consistent with the rest of the code
2016-01-13 13:32:59 +00:00
Daniel Wagner-Hall
42aa1f3f33
Merge pull request #478 from matrix-org/daniel/userobject
...
Introduce a User object
I'm sick of passing around more and more things as tuple items around
the whole world, and needing to edit every call site every time there is
more information about a user. So pass them around together as an
object.
This object has incredibly poorly named fields because we have a
convention that `user` indicates a UserID object, and `user_id`
indicates a string. I tried to clean up the whole repo to fix this, but
gave up. So instead, I introduce a second convention. A user_object is a
User, and a user_id_object is a UserId. I may have cried a little bit.
2016-01-11 17:50:22 +00:00
Daniel Wagner-Hall
2110e35fd6
Introduce a Requester object
...
This tracks data about the entity which made the request. This is
instead of passing around a tuple, which requires call-site
modifications every time a new piece of optional context is passed
around.
I tried to introduce a User object. I gave up.
2016-01-11 17:48:45 +00:00
David Baker
c232780081
Merge pull request #456 from matrix-org/store_event_actions
...
Send unread notification counts
2016-01-08 14:47:15 +00:00
Mark Haines
8677b7d698
Only use cropped thumbnails when asked for a cropped thumbnail.
...
Even though ones cropped with scale might be technically valid.
2016-01-07 18:57:15 +00:00
Matthew Hodgson
6c28ac260c
copyrights
2016-01-07 04:26:29 +00:00
Daniel Wagner-Hall
11a974da21
Add /_matrix/versions to report supported versions
2016-01-06 18:08:52 +00:00
David Baker
442fcc02f7
Merge remote-tracking branch 'origin/develop' into store_event_actions
2016-01-06 17:28:55 +00:00
Mark Haines
392773ccb2
Guest users must be joined to a room to see it in /sync
2016-01-06 16:44:13 +00:00
David Baker
c79f221192
Add is_guest flag to users db to track whether a user is a guest user or not. Use this so we can run _filter_events_for_client when calculating event_push_actions.
2016-01-06 11:38:09 +00:00
David Baker
eb03625626
Merge remote-tracking branch 'origin/develop' into store_event_actions
2016-01-05 18:39:50 +00:00
Daniel Wagner-Hall
cfd07aafff
Allow guests to upgrade their accounts
2016-01-05 18:01:18 +00:00
Erik Johnston
8737ead008
Use larger thumbnail rather than smaller.
2016-01-05 17:30:30 +00:00
David Baker
c77e7e60fc
Only joined rooms have unread_notif_count
2016-01-04 15:49:06 +00:00
David Baker
928c575c6f
Merge remote-tracking branch 'origin/develop' into store_event_actions
2016-01-04 13:39:51 +00:00
Richard van der Hoff
32d9fd0b26
Expose /login under r0
...
The spec says /login should be available at r0 and 'unstable', so make it so.
2016-01-02 17:24:28 +00:00
David Baker
140a50f641
Merge remote-tracking branch 'origin/develop' into store_event_actions
2015-12-22 17:23:35 +00:00
Mark Haines
45a9e0ae0c
Allow guest access if the user provides a list of rooms in the filter
2015-12-22 10:25:46 +00:00
David Baker
c061b47c57
Merge remote-tracking branch 'origin/develop' into store_event_actions
2015-12-21 15:30:26 +00:00
Mark Haines
64b6606824
Remove accidentally committed debug logging
2015-12-21 15:22:03 +00:00
David Baker
42ad49f5b7
still very WIP, but now sends unread_notifications_count in the room object on sync (only actually corrrect in a full sync: hardcoded to 0 in incremental syncs).
2015-12-16 18:42:09 +00:00
Mark Haines
3ddf0b9722
Fix spacing
2015-12-14 15:20:59 +00:00
Mark Haines
2acae8300f
Fix logging to lie less
2015-12-14 15:19:37 +00:00
Mark Haines
28c5181dfe
Add commentary for fix in PR#442
2015-12-14 14:50:51 +00:00
Mark Haines
070e28e203
Combine the prev content tests
2015-12-14 14:34:04 +00:00
Mark Haines
834924248f
Check whether prev_content or prev_sender is set before trying to rollback state
2015-12-14 14:09:21 +00:00
Mark Haines
515548a47a
Missing yield
2015-12-10 17:54:23 +00:00
Mark Haines
e4bfe50e8f
Allow filter JSON object in the filter query parameter in /sync
...
Documented by matrix-org/matrix-doc#224
2015-12-09 12:56:50 +00:00
Daniel Wagner-Hall
7a8ba4c9a0
Actually host r0 and unstable prefixes
2015-12-08 15:26:52 +00:00
David Baker
9c9b2829ae
also do more structured logging
2015-12-07 12:01:00 +00:00
David Baker
50e5886de1
pep8
2015-12-07 11:57:48 +00:00
David Baker
ba1d740239
Add logging to pushers API to log the body of the request
2015-12-07 11:52:20 +00:00
Daniel Wagner-Hall
41905784f7
Take object not bool
...
Allows bool as legacy fallback
See https://github.com/matrix-org/matrix-doc/pull/212
2015-12-07 10:44:33 +00:00
Daniel Wagner-Hall
ac213c2e08
Merge pull request #415 from matrix-org/daniel/endpoints
...
Merge pull request #415 from matrix-org/daniel/endpoints
2015-12-03 12:19:12 +00:00
Daniel Wagner-Hall
526bc33e02
Fix implementation of /admin/whois
2015-12-02 17:29:47 +00:00
Daniel Wagner-Hall
872c134807
Update endpoints to reflect current spec
2015-12-02 15:45:04 +00:00
Mark Haines
37b2d69bbc
Reuse a single http client, rather than creating new ones
2015-12-02 11:36:02 +00:00
Mark Haines
95f30ecd1f
Add API for setting account_data globaly or on a per room basis
2015-12-01 18:41:32 +00:00
Daniel Wagner-Hall
14d7acfad4
Host /unstable and /r0 versions of r0 APIs
2015-12-01 17:34:32 +00:00
Mark Haines
31069ecf6a
Rename presence_handler.send_invite to presence_handler.send_presence_invite to distinguish it from normal invites
2015-12-01 15:59:45 +00:00
Mark Haines
c6a15f5026
Merge pull request #385 from matrix-org/daniel/forgetrooms
...
Allow users to forget rooms
2015-11-20 18:07:26 +00:00
Richard van der Hoff
1d9c1d4166
Merge pull request #389 from matrix-org/rav/flatten_sync_response
...
v2 sync: Get rid of the event_map, and rename the keys of the rooms obj
2015-11-20 15:18:55 +00:00
Erik Johnston
3f151da314
Merge pull request #391 from matrix-org/erikj/remove_token_from_flow
...
Remove m.login.token from advertised flows.
2015-11-20 14:16:59 +00:00
Erik Johnston
e3dae653e8
Comment
2015-11-20 14:05:22 +00:00
Paul "LeoNerd" Evans
dd11bf8a79
Merge branch 'develop' into rav/flatten_sync_response
2015-11-19 17:21:03 +00:00
Paul "LeoNerd" Evans
1cfda3d2d8
Merge branch 'develop' into daniel/forgetrooms
2015-11-19 16:53:13 +00:00
Erik Johnston
37de8a7f4a
Remove m.login.token from advertised flows.
2015-11-19 16:16:49 +00:00
Richard van der Hoff
f6e092f6cc
Put back the 'state.events' subobject
...
We're keeping 'events', in case we decide to add more keys later.
2015-11-19 12:23:42 +00:00
Richard van der Hoff
24ae0eee8e
v2 /sync: Rename the keys of the 'rooms' object to match member states
...
joined->join
invited->invite
archived->leave
2015-11-19 10:51:12 +00:00
Richard van der Hoff
3c3fc6b268
Flatten the /sync response to remove the event_map
2015-11-19 10:51:11 +00:00
Mark Haines
1c960fbb80
s/private_user_data/account_data/
2015-11-18 15:31:04 +00:00
Daniel Wagner-Hall
ba26eb3d5d
Allow users to forget rooms
2015-11-17 17:17:30 -05:00
Steven Hammerton
f5e25c5f35
Merge branch 'develop' into sh-cas-auth-via-homeserver
2015-11-17 10:55:41 +00:00
Daniel Wagner-Hall
9c3f4f8dfd
Allow guests to /room/:room_id/{join,leave}
2015-11-13 11:56:58 +00:00
Richard van der Hoff
e4d622aaaf
Implementation of state rollback in /sync
...
Implementation of SPEC-254: roll back the state dictionary to how it looked at
the start of the timeline.
Merged PR https://github.com/matrix-org/synapse/pull/373
2015-11-13 10:58:56 +00:00
Richard van der Hoff
5ab4b0afe8
Make handlers.sync return a state dictionary, instead of an event list.
...
Basically this moves the process of flattening the existing dictionary into a
list up to rest.client.*, instead of doing it in handlers.sync. This simplifies
a bit of the code in handlers.sync, but it is also going to be somewhat
beneficial in the next stage of my hacking on SPEC-254.
Merged from PR #371
2015-11-13 10:35:01 +00:00
Richard van der Hoff
5dea4d37d1
Update some comments
...
Add a couple of type annotations, docstrings, and other comments, in the
interest of keeping track of what types I have.
Merged from pull request #370 .
2015-11-13 10:31:15 +00:00
Daniel Wagner-Hall
0d08670f61
Merge pull request #360 from matrix-org/daniel/guestroominitialsync
...
Merge pull request #360 from matrix-org/daniel/guestroominitialsync
Allow guest access to room initialSync
2015-11-12 15:19:55 +00:00
Daniel Wagner-Hall
0a93df5f9c
Allow guests to set their display names
...
Depends: https://github.com/matrix-org/synapse/pull/363
Tests in https://github.com/matrix-org/sytest/pull/66
2015-11-12 13:44:39 +00:00
Daniel Wagner-Hall
e93d550b79
Allow guests to access room context API
2015-11-11 17:49:44 +00:00
Daniel Wagner-Hall
f15ba926cc
Allow guest access to room initialSync
2015-11-11 17:13:24 +00:00
Steven Hammerton
ffdc8e5e1c
Snakes not camels
2015-11-11 14:26:47 +00:00
Steven Hammerton
2b779af10f
Minor review fixes
2015-11-11 11:21:43 +00:00
Daniel Wagner-Hall
38d82edf0e
Allow guest users to join and message rooms
2015-11-10 16:57:13 +00:00
Daniel Wagner-Hall
82e8a2d763
Merge pull request #356 from matrix-org/daniel/3pidyetagain
...
Get display name from identity server, not client
2015-11-10 12:44:17 +00:00
Daniel Wagner-Hall
0d63dc3ec9
Get display name from identity server, not client
2015-11-09 17:26:43 +00:00
Richard van der Hoff
9107ed23b7
Add a couple of unit tests for room/<x>/messages
...
... merely because I was trying to figure out how it worked, and couldn't.
2015-11-09 16:16:43 +00:00
Steven Hammerton
fece2f5c77
Merge branch 'develop' into sh-cas-auth-via-homeserver
2015-11-05 20:59:45 +00:00
Erik Johnston
6be1b4b113
Merge pull request #350 from matrix-org/erikj/search
...
Implement pagination, order by and groups in search
2015-11-05 17:52:32 +00:00
Daniel Wagner-Hall
2cebe53545
Exchange 3pid invites for m.room.member invites
2015-11-05 16:43:19 +00:00
Erik Johnston
729ea933ea
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/search
2015-11-05 15:43:52 +00:00
Erik Johnston
7301e05122
Implement basic pagination for search results
2015-11-05 15:04:08 +00:00
Daniel Wagner-Hall
ca2f90742d
Open up /events to anonymous users for room events only
...
Squash-merge of PR #345 from daniel/anonymousevents
2015-11-05 14:32:26 +00:00
Steven Hammerton
414a4a71b4
Allow hs to do CAS login completely and issue the client with a login token that can be redeemed for the usual successful login response
2015-11-05 14:06:48 +00:00
Daniel Wagner-Hall
f522f50a08
Allow guests to register and call /events?room_id=
...
This follows the same flows-based flow as regular registration, but as
the only implemented flow has no requirements, it auto-succeeds. In the
future, other flows (e.g. captcha) may be required, so clients should
treat this like the regular registration flow choices.
2015-11-04 17:29:07 +00:00
Mark Haines
06986e46a3
That TODO was done
2015-11-03 14:28:51 +00:00
Mark Haines
57be722c46
Include room tags in v2 /sync
2015-11-02 16:23:15 +00:00
Mark Haines
ddd8566f41
Store room tag content and return the content in the m.tag event
2015-11-02 15:11:31 +00:00
Mark Haines
0e36756383
Merge branch 'develop' into markjh/room_tags
2015-11-02 10:57:00 +00:00
Mark Haines
f40b0ed5e1
Inform the client of new room tags using v1 /events
2015-10-29 15:21:09 +00:00
Erik Johnston
e83c4b8e3e
Merge pull request #334 from matrix-org/erikj/context_api
...
Add room context api
2015-10-28 18:26:01 +00:00
Mark Haines
a89b86dc47
Fix pyflakes errors
2015-10-28 16:45:57 +00:00
Mark Haines
892e70ec84
Add APIs for adding and removing tags from rooms
2015-10-28 16:06:57 +00:00
Erik Johnston
5cb298c934
Add room context api
2015-10-28 13:45:56 +00:00
Richard van der Hoff
c79c4f9b14
Implement full_state incremental sync
...
A hopefully-complete implementation of the full_state incremental sync, as
specced at https://github.com/matrix-org/matrix-doc/pull/133 .
This actually turns out to be a relatively simple modification to the initial
sync implementation.
2015-10-26 18:47:18 +00:00
Erik Johnston
259d10f0e4
Merge branch 'release-v0.10.1' of github.com:matrix-org/synapse into develop
2015-10-23 11:11:56 +01:00
Erik Johnston
b0ac0a9438
Merge pull request #319 from matrix-org/erikj/filter_refactor
...
Refactor api.filtering to have a Filter API
2015-10-22 13:17:10 +01:00
Erik Johnston
5025ba959f
Add config option to disable password login
2015-10-22 10:37:04 +01:00
Mark Haines
e94ffd89d6
Merge pull request #316 from matrix-org/markjh/v2_sync_archived
...
Add rooms that the user has left under archived in v2 sync.
2015-10-21 15:46:41 +01:00
Kegan Dougal
ede07434e0
Use 403 and message to match handlers/auth
2015-10-21 09:42:07 +01:00
Erik Johnston
45cd2b0233
Refactor api.filtering to have a Filter API
2015-10-20 15:33:25 +01:00
Kegan Dougal
b02a342750
Don't 500 when the email doesn't map to a valid user ID.
2015-10-20 11:07:50 +01:00
Mark Haines
68b7fc3e2b
Add rooms that the user has left under archived in v2 sync.
2015-10-19 17:26:18 +01:00
Erik Johnston
e0bf0258ee
Merge pull request #307 from matrix-org/erikj/search
...
Add basic search API
2015-10-19 13:37:15 +01:00
Mark Haines
9371a35e89
Merge pull request #306 from matrix-org/markjh/unused_methods
...
Remove some login classes from synapse.
2015-10-16 18:18:41 +01:00
Erik Johnston
33646eb000
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/search
2015-10-16 15:35:35 +01:00
Erik Johnston
bcfb653816
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/search
2015-10-15 16:37:32 +01:00
Daniel Wagner-Hall
f38df51e8d
Merge branch 'develop' into daniel/3pidinvites
2015-10-15 11:51:55 +01:00
Mark Haines
1a934e8bfd
synapse.client.v1.login.LoginFallbackRestServlet and synapse.client.v1.login.PasswordResetRestServlet are unused
2015-10-15 11:09:57 +01:00
Daniel Wagner-Hall
0c38e8637f
Remove unnecessary class-wrapping
2015-10-13 18:00:38 +01:00
Daniel Wagner-Hall
14edea1aff
Move logic into handler
2015-10-13 17:47:58 +01:00
Daniel Wagner-Hall
b68db61222
Add logging
2015-10-13 17:22:50 +01:00
Daniel Wagner-Hall
17dffef5ec
Move event contents into third_party_layout field
2015-10-13 15:48:12 +01:00
Daniel Wagner-Hall
32a453d7ba
Merge branch 'develop' into daniel/3pidinvites
2015-10-13 13:32:43 +01:00
Erik Johnston
f9340ea0d5
Merge branch 'erikj/store_engine' into erikj/search
2015-10-13 13:29:02 +01:00
Mark Haines
54414221e4
Include invites in incremental sync
2015-10-13 11:43:12 +01:00
Mark Haines
ab9cf73258
Include invited rooms in the initial sync
2015-10-13 11:03:48 +01:00
Mark Haines
f96b480670
Merge branch 'develop' into markjh/v2_sync_api
2015-10-13 10:33:00 +01:00
Mark Haines
956509dfec
Start spliting out the rooms into joined and invited in v2 sync
2015-10-13 10:24:51 +01:00
Mark Haines
586beb8318
Update the filters to match the latest spec.
...
Apply the filter the 'timeline' and 'ephemeral' keys of rooms.
Apply the filter to the 'presence' key of a sync response.
2015-10-12 16:54:58 +01:00
Steven Hammerton
739464fbc5
Add a comment to clarify why we split on closing curly brace when reading CAS attribute tags
2015-10-12 16:02:17 +01:00
Erik Johnston
f6fde343a1
Merge remote-tracking branch 'origin/develop' into erikj/search
2015-10-12 15:06:18 +01:00
Steven Hammerton
83b464e4f7
Unpack dictionary in for loop for nicer syntax
2015-10-12 15:05:34 +01:00
Steven Hammerton
7f8fdc9814
Remove not required parenthesis
2015-10-12 14:45:24 +01:00
Steven Hammerton
01a5f1991c
Support multiple required attributes in CAS response, and in a nicer config format too
2015-10-12 14:43:17 +01:00
Steven Hammerton
76421c496d
Allow optional config params for a required attribute and it's value, if specified any CAS user must have the given attribute and the value must equal
2015-10-12 11:11:49 +01:00
Steven Hammerton
7845f62c22
Parse both user and attributes from CAS response
2015-10-12 10:55:13 +01:00
Erik Johnston
61561b9df7
Keep FTS indexes up to date. Only search through rooms currently joined
2015-10-12 10:49:53 +01:00
Steven Hammerton
95f7661170
Raise LoginError if CasResponse doensn't contain user
2015-10-10 10:54:19 +01:00
Steven Hammerton
a9c299c0be
Fix my broken line splitting
2015-10-10 10:54:19 +01:00
Steven Hammerton
e52f4dc599
Use UserId to create FQ user id
2015-10-10 10:54:19 +01:00
Steven Hammerton
625e13bfde
Add get_raw method to SimpleHttpClient, use this in CAS auth rather than requests
2015-10-10 10:54:19 +01:00
Steven Hammerton
22112f8d14
Formatting changes
2015-10-10 10:49:42 +01:00
Steven Hammerton
c33f5c1a24
Provide ability to login using CAS
2015-10-10 10:49:42 +01:00
Mark Haines
0a96a9a023
Set the user as online if they start polling the v2 sync
2015-10-09 19:57:50 +01:00
Mark Haines
af7b214476
Merge branch 'markjh/eventstream_presence' into markjh/v2_sync_api
2015-10-09 19:18:09 +01:00
Mark Haines
c15cf6ac06
Format the presence events correctly for v2
2015-10-09 18:50:15 +01:00
Erik Johnston
c85c912562
Add basic full text search impl.
2015-10-09 15:48:31 +01:00
Mark Haines
51ef725647
Use 'true' rather than '1' for archived flag
2015-10-08 18:13:02 +01:00
Mark Haines
dc72021748
Add a flag to initial sync to indicate we want rooms that the user has left
2015-10-08 17:26:23 +01:00
Mark Haines
dfef2b41aa
Update the v2 room sync format to match the current v2 spec
2015-10-08 15:17:43 +01:00
Mark Haines
e3d3205cd9
Update the sync response to match the latest spec
2015-10-07 15:55:20 +01:00
Daniel Wagner-Hall
fcd9ba8802
Fix lint errors
2015-10-06 10:13:05 -05:00
Mark Haines
471555b3a8
Move the rooms out into a room_map mapping from room_id to room.
2015-10-05 16:39:36 +01:00
Daniel Wagner-Hall
58e6a58eb7
Merge branch 'develop' into daniel/3pidinvites
2015-10-05 10:33:41 -05:00
Mark Haines
f31014b18f
Start updating the sync API to match the specification
2015-10-01 17:53:07 +01:00
Daniel Wagner-Hall
5b3e9713dd
Implement third party identifier invites
2015-10-01 17:49:52 +01:00
Kegan Dougal
bad780a197
Validate the receipt type before passing it on to the receipt handler
2015-10-01 14:01:52 +01:00
Mark Haines
ee2d722f0f
Merge pull request #276 from matrix-org/markjh/history_for_rooms_that_have_been_left
...
SPEC-216: Allow users to view the history of rooms that they have left.
2015-09-21 14:38:13 +01:00
David Baker
184a5c81f0
Merge pull request #274 from matrix-org/add_threepid_fix
...
Fix adding threepids to an existing account
2015-09-10 10:36:58 +01:00
David Baker
30768dcf40
Fix adding threepids to an existing account
2015-09-10 10:33:48 +01:00
Mark Haines
3c166a24c5
Remove undocumented and unimplemented 'feedback' parameter from the Client-Server API
2015-09-09 16:05:09 +01:00
Mark Haines
bc8b25eb56
Allow users that have left the room to view the member list from the point they left
2015-09-09 15:42:16 +01:00
Mark Haines
a7122692d9
Merge branch 'release-v0.10.0' into develop
...
Conflicts:
synapse/handlers/auth.py
synapse/python_dependencies.py
synapse/rest/client/v1/login.py
2015-08-28 11:15:27 +01:00
Erik Johnston
ddf4d2bd98
Consistency
2015-08-27 10:50:49 +01:00
Erik Johnston
66ec6cf9b8
Check for an internationalised filename first
2015-08-27 10:48:58 +01:00
Erik Johnston
53c2eed862
None check the correct variable
2015-08-27 10:38:22 +01:00
Erik Johnston
f02532baad
Check for None
2015-08-27 10:37:02 +01:00
Mark Haines
c9cb354b58
Give a sensible error message if the filename is invalid UTF-8
2015-08-26 17:27:23 +01:00
Mark Haines
5a9e0c3682
Handle unicode filenames given when downloading or received over federation
2015-08-26 17:08:47 +01:00
Mark Haines
e85c7873dc
Allow non-ascii filenames for attachments
2015-08-26 16:26:37 +01:00
Daniel Wagner-Hall
d3c0e48859
Merge erikj/user_dedup to develop
2015-08-26 13:42:45 +01:00
Daniel Wagner-Hall
ee3fa1a99c
Merge pull request #248 from matrix-org/deviceid
...
Remove completely unused concepts from codebase
2015-08-25 17:19:06 +01:00
Daniel Wagner-Hall
825f0875bc
Fix up one more reference
2015-08-25 16:37:37 +01:00
Daniel Wagner-Hall
a0b181bd17
Remove completely unused concepts from codebase
...
Removes device_id and ClientInfo
device_id is never actually written, and the matrix.org DB has no
non-null entries for it. Right now, it's just cluttering up code.
This doesn't remove the columns from the database, because that's
fiddly.
2015-08-25 16:23:06 +01:00
Mark Haines
78323ccdb3
Remove syutil dependency in favour of smaller single-purpose libraries
2015-08-24 16:17:38 +01:00
Erik Johnston
42f12ad92f
When logging in fetch user by user_id case insensitively, *unless* there are multiple case insensitive matches, in which case require the exact user_id
2015-08-21 11:38:44 +01:00
David Baker
21b71b6d7c
Return fully qualified user_id as per spec
2015-08-20 21:54:53 +01:00
Daniel Wagner-Hall
e8cf77fa49
Merge branch 'develop' into refresh
...
Conflicts:
synapse/rest/client/v1/login.py
2015-08-20 16:25:40 +01:00
Daniel Wagner-Hall
cecbd636e9
/tokenrefresh POST endpoint
...
This allows refresh tokens to be exchanged for (access_token,
refresh_token).
It also starts issuing them on login, though no clients currently
interpret them.
2015-08-20 16:21:35 +01:00
David Baker
f764f92647
Remove spurious extra arg to set_password
2015-08-20 15:35:54 +01:00
Mark Haines
22346a0ee7
Merge pull request #206 from matrix-org/erikj/generate_presice_thumbnails
...
Always return a thumbnail of the requested size.
2015-08-20 11:27:15 +01:00
David Baker
4cf302de5b
Comma comma comma comma comma chameleon
2015-08-20 10:31:18 +01:00
David Baker
c50ad14bae
Merge branch 'develop' into email_login
2015-08-20 10:16:01 +01:00
Mark Haines
a0b8e5f2fe
Merge pull request #211 from matrix-org/email_in_use
...
Changes for unique emails
2015-08-20 10:04:04 +01:00
Mark Haines
8899df13bf
Merge pull request #208 from matrix-org/markjh/end-to-end-key-federation
...
Federation for end-to-end key requests.
2015-08-18 09:12:54 +01:00
Mark Haines
c5966b2a97
Merge remote-tracking branch 'origin/develop' into markjh/end-to-end-key-federation
2015-08-13 17:27:53 +01:00
Mark Haines
b16cd18a86
Merge remote-tracking branch 'origin/develop' into erikj/generate_presice_thumbnails
2015-08-13 17:23:39 +01:00
Daniel Wagner-Hall
415c2f0549
Simplify LoginHander and AuthHandler
...
* Merge LoginHandler -> AuthHandler
* Add a bunch of documentation
* Improve some naming
* Remove unused branches
I will start merging the actual logic of the two handlers shortly
2015-08-12 15:49:37 +01:00
David Baker
f43041aacd
Check absent before trying to access keys
2015-08-12 15:44:08 +01:00
David Baker
73605f8070
Just leaving off the $ is fine. r* == registerrrrrrrrr
2015-08-12 15:40:54 +01:00
Mark Haines
fdb724cb70
Add config option for setting the list of thumbnail sizes to precalculate
2015-08-12 10:55:27 +01:00
Mark Haines
7e3d1c7d92
Make a config option for whether to generate new thumbnail sizes dynamically
2015-08-12 10:54:38 +01:00
David Baker
185ac7ee6c
Allow sign in using email address
2015-08-04 16:29:54 +01:00
David Baker
a0dea6eaed
Remember to yield: not much point testing is a deferred is not None
2015-08-04 16:18:17 +01:00
David Baker
883aabe423
splt long line
2015-08-04 15:20:35 +01:00
David Baker
c77048e12f
Add endpoint that proxies ID server request token and errors if the given email is in use on this Home Server.
2015-08-04 14:37:09 +01:00
David Baker
7148aaf5d0
Don't try & check the username if we don't have one (which we won't if it's been saved in the auth layer)
2015-08-03 17:03:27 +01:00
Kegan Dougal
11b0a34074
Use the same reg paths as register v1 for ASes.
...
Namely this means using registration_handler.appservice_register.
2015-07-29 10:00:54 +01:00
Kegan Dougal
a4d62ba36a
Fix v2_alpha registration. Add unit tests.
...
V2 Registration forced everyone (including ASes) to create a password for a
user, when ASes should be able to omit passwords. Also unbreak AS registration
in general which checked too early if the given username was claimed by an AS;
it was checked before knowing if the AS was the one doing the registration! Add
unit tests for AS reg, user reg and disabled_registration flag.
2015-07-28 17:34:12 +01:00
Mark Haines
2da3b1e60b
Get the end-to-end key federation working
2015-07-24 18:26:46 +01:00
Mark Haines
62c010283d
Add federation support for end-to-end key requests
2015-07-23 16:03:38 +01:00
Erik Johnston
459085184c
Factor out thumbnail()
2015-07-23 15:59:53 +01:00
Erik Johnston
2b4f47db9c
Generate local thumbnails on a thread
2015-07-23 14:52:29 +01:00
Erik Johnston
33d83f3615
Fix remote thumbnailing
2015-07-23 14:24:21 +01:00
Erik Johnston
ff7c2e41de
Always return a thumbnail of the requested size.
...
Before, we returned a thumbnail that was at least as big (if possible)
as the requested size. Now, if we don't have a thumbnail of the given
size we generate (and persist) one of that size.
2015-07-23 14:12:49 +01:00
Erik Johnston
103e1c2431
Pick larger than desired thumbnail for 'crop'
2015-07-23 11:12:49 +01:00
David Baker
a56eccbbfc
Query for all the ones we were asked about, not just the last...
2015-07-21 16:38:16 -07:00
Mark Haines
3b5823c74d
s/take/claim/ for end to end key APIs
2015-07-20 18:23:54 +01:00
Kegan Dougal
ddef5ea126
Remove semicolon.
2015-07-20 14:02:36 +01:00
Kegan Dougal
b6ee0585bd
Parse the ID given to /invite|ban|kick to make sure it looks like a user ID.
2015-07-20 13:55:19 +01:00
Erik Johnston
b6d4a4c6d8
Merge pull request #199 from matrix-org/erikj/receipts
...
Implement read receipts.
2015-07-16 18:18:36 +01:00
David Baker
09489499e7
pep8 + debug line
2015-07-15 19:39:18 +01:00
David Baker
4da05fa0ae
Add back in support for remembering parameters submitted to a user-interactive auth call.
2015-07-15 19:28:57 +01:00
Matthew Hodgson
8cedf3ce95
bump up image quality a bit more as it looks crap
2015-07-14 23:53:13 +01:00
Erik Johnston
5989637f37
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/receipts
2015-07-13 13:50:57 +01:00
Erik Johnston
b7cb37b189
Merge pull request #198 from matrix-org/markjh/client-end-to-end-key-management
...
Client end to end key management API
2015-07-10 13:36:17 +01:00
Mark Haines
a01097d60b
Assume that each device for a user has only one of each type of key
2015-07-10 13:26:18 +01:00
Erik Johnston
f3049d0b81
Small tweaks to SAML2 configuration.
...
- Add saml2 config docs to default config.
- Use existence of saml2 config to indicate if saml2 should be enabled.
2015-07-10 10:50:14 +01:00
Erik Johnston
9158ad1abb
Merge pull request #201 from EricssonResearch/msba/saml2-develop
...
Integrate SAML2 basic authentication - uses pysaml2
2015-07-10 10:25:56 +01:00
Mark Haines
bf0d59ed30
Don't bother with a timeout for one time keys on the server.
2015-07-09 14:04:03 +01:00
Muthu Subramanian
8cd34dfe95
Make SAML2 optional and add some references/comments
2015-07-09 13:34:47 +05:30
Muthu Subramanian
d2caa5351a
code beautify
2015-07-09 12:58:15 +05:30
Erik Johnston
304343f4d7
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/receipts
2015-07-08 15:37:33 +01:00
Muthu Subramanian
77c5db5977
code beautify
2015-07-08 16:05:20 +05:30
Muthu Subramanian
81682d0f82
Integrate SAML2 basic authentication - uses pysaml2
2015-07-08 15:36:54 +05:30
Erik Johnston
ca041d5526
Wire together receipts and the notifer/federation
2015-07-07 15:25:30 +01:00
Erik Johnston
e8b2f6f8a1
Add a ReceiptServlet
2015-07-07 10:55:22 +01:00
Mark Haines
2ef182ee93
Add client API for uploading and querying keys for end to end encryption
2015-07-06 18:47:57 +01:00
Erik Johnston
12b83f1a0d
If user supplies filename in URL when downloading from media repo, use that name in Content Disposition
2015-07-03 11:24:55 +01:00
Erik Johnston
9beaedd164
Enforce ascii filenames for uploads
2015-06-30 10:31:59 +01:00
Erik Johnston
2124f668db
Add Content-Disposition headers to media repo v1 downloads
2015-06-30 09:35:44 +01:00
Erik Johnston
fb7def3344
Remove access_token from synapse.rest.client.v1.transactions {get,store}_response logging
2015-06-16 10:09:43 +01:00
Erik Johnston
5730b20c6d
Merge pull request #175 from matrix-org/erikj/thumbnail_thread
...
Thumbnail images on a seperate thread
2015-06-03 17:26:56 +01:00
Erik Johnston
2ef2f6d593
SYN-403: Make content repository use its own http client.
2015-06-03 10:17:37 +01:00
Erik Johnston
5044e6c544
Thumbnail images on a seperate thread
2015-06-02 15:39:08 +01:00
Erik Johnston
a7b65bdedf
Add config option to turn off freezing events. Use new encode_json api and ujson.loads
2015-05-29 12:17:33 +01:00
Erik Johnston
9ba3c1ede4
Merge pull request #165 from matrix-org/bugs/SYN-390
...
SYN-390: Don't modify the dictionary returned from the data store
2015-05-26 10:20:36 +01:00
Mark Haines
a0bebeda8b
SYN-390: Don't modify the dictionary returned from the data store
2015-05-26 10:14:15 +01:00
David Baker
c37a6e151f
Make shared secret registration work again
2015-05-14 12:03:13 +01:00
Erik Johnston
fca28d243e
Change the way we create observers to deferreds so that we don't get spammed by 'unhandled errors'
2015-05-08 16:28:08 +01:00
David Baker
eb9bd2d949
user_id now in user_threepids
2015-05-01 15:04:37 +01:00
Mark Haines
4ad8b45155
Merge branch 'develop' into key_distribution
...
Conflicts:
synapse/config/homeserver.py
2015-04-29 13:15:14 +01:00
Mark Haines
46d200a3a1
Implement minimum_valid_until_ts in the remote key resource
2015-04-29 11:57:26 +01:00
Mark Haines
9182f87664
Merge pull request #126 from matrix-org/csauth
...
Client / Server Auth Refactor
2015-04-28 11:00:27 +01:00
Mark Haines
f8b865264a
Merge branch 'develop' into key_distribution
...
Conflicts:
synapse/crypto/keyring.py
2015-04-27 18:29:32 +01:00
Erik Johnston
e701aec2d1
Implement locks using create_observer for fetching media and server keys
2015-04-27 14:20:26 +01:00
David Baker
03c4f0ed67
pep8
2015-04-27 12:36:59 +01:00
David Baker
f1acb9fd40
logging args
2015-04-27 11:56:34 +01:00
David Baker
7ac8a60c6f
More underscores
2015-04-24 11:44:27 +01:00
David Baker
a218619626
Use underscores instead of camelcase for id server stuff
2015-04-24 11:27:38 +01:00
Mark Haines
31e262e6b4
Copyright notice
2015-04-24 10:36:51 +01:00
Mark Haines
eede182df7
Merge branch 'develop' into key_distribution
2015-04-24 10:35:49 +01:00
Mark Haines
4e2f8b8722
Copyright notices
2015-04-24 10:35:29 +01:00
David Baker
6532b6e607
Merge branch 'develop' into csauth
...
Conflicts:
synapse/http/server.py
2015-04-24 09:37:54 +01:00
David Baker
03eb4adc6e
Dedicated error code for failed 3pid auth verification
2015-04-23 18:20:17 +01:00
Mark Haines
4bbf7156ef
Update to match the specification for key/v2
2015-04-23 16:39:13 +01:00
Mark Haines
f30d47c876
Implement remote key lookup api
2015-04-22 14:21:08 +01:00
Mark Haines
3ba522bb23
Merge branch 'develop' into key_distribution
2015-04-21 17:10:25 +01:00
Mark Haines
812a99100b
Set a version_string in BaseMediaResource so that the request_handler wrapper works
2015-04-21 16:43:58 +01:00
Mark Haines
1967650bc4
Combine the request wrappers in rest/media/v1 and http/server into a single wrapper decorator
2015-04-21 16:35:53 +01:00
Mark Haines
2f9157b427
Implement v2 key lookup
2015-04-20 16:23:47 +01:00
David Baker
8db6832db8
Password reset, finally.
2015-04-17 19:53:47 +01:00
David Baker
117f35ac4a
Add endpoint to get threepids from server
2015-04-17 17:20:18 +01:00
David Baker
f96ab9d18d
make add3pid servlet work
2015-04-17 16:44:49 +01:00
David Baker
0b1a8500a2
just the once would probably be fine
2015-04-17 13:53:54 +01:00
David Baker
cb03fafdf1
Merge branch 'develop' into csauth
2015-04-17 13:51:10 +01:00
David Baker
bf5e54f255
Register the 3pid servlet
2015-04-17 13:44:55 +01:00
David Baker
94e1e58b4d
password -> account servlet and add start of an 'add 3pid' endpoint
2015-04-17 13:44:12 +01:00
David Baker
ea1776f556
Return user ID in use error straight away
2015-04-16 19:56:44 +01:00
David Baker
766bd8e880
Dummy login so we can do the first POST request to get login flows without it just succeeding
2015-04-15 17:14:25 +01:00
David Baker
a19b739909
Regstration with email in v2
2015-04-15 15:50:38 +01:00
Mark Haines
32e14d8181
Return a sha256 fingerprint rather than the entire tls certificate
2015-04-14 19:10:09 +01:00
Mark Haines
d488463fa3
Add a version 2 of the key server api
2015-04-14 16:04:52 +01:00
Mark Haines
3cbc286d06
Move server key api into rest/key/v1
2015-04-14 13:28:11 +01:00
David Baker
4eb6d66b45
Add app service auth back in to v2 register
2015-04-02 17:51:19 +01:00
David Baker
6b59650753
Throw sensible errors on not-json when allowing empty body
2015-04-02 17:45:16 +01:00
David Baker
41cd778d66
pep8
2015-04-02 17:06:17 +01:00
David Baker
70a84f17f3
Add shared secret auth into register v2 and switch the script over.
2015-04-02 17:01:29 +01:00
David Baker
e9c908ebc0
Completely replace fallback auth for C/S V2:
...
* Now only the auth part goes to fallback, not the whole operation
* Auth fallback is a normal API endpoint, not a static page
* Params like the recaptcha pubkey can just live in the config
Involves a little engineering on JsonResource so its servlets aren't always forced to return JSON. I should document this more, in fact I'll do that now.
2015-04-01 15:05:30 +01:00
David Baker
9f642a93ec
pep8
2015-03-31 09:50:44 +01:00
Kegan Dougal
e7887e37a8
Remove appservice REST servlets
2015-03-31 09:32:40 +01:00
David Baker
59bf16eddc
New registration for C/S API v2. Only ReCAPTCHA working currently.
2015-03-30 18:13:10 +01:00
David Baker
c1a256cc4c
Allow multiple pushers for a single app ID & pushkey, honouring the 'append' flag in the API.
2015-03-25 19:06:22 +00:00
David Baker
c7023f2155
1) Pushers are now associated with an access token
...
2) Change places where we mean unauthenticated to 401, not 403, in C/S v2: hack so it stays as 403 in v1 because web client relies on it.
2015-03-24 17:24:15 +00:00
David Baker
d19e79ecc9
Make deleting other access tokens when you change your password actually work
2015-03-24 15:33:48 +00:00
David Baker
78adccfaf4
pep8 / pyflakes
2015-03-23 14:23:51 +00:00
David Baker
d98660a60d
Implement password changing (finally) along with a start on making client/server auth more general.
2015-03-23 14:20:28 +00:00
Erik Johnston
f88db7ac0b
Factor out user id validation checks
2015-03-18 11:34:18 +00:00
Erik Johnston
57976f646f
Do more validation of incoming request
2015-03-18 11:30:04 +00:00
Erik Johnston
250e143084
Use 403 instead of 400
2015-03-16 13:11:42 +00:00
Erik Johnston
69135f59aa
Implement registering with shared secret.
2015-03-13 15:23:37 +00:00
Matthew Hodgson
f55bd3f94b
bump dep on syweb 0.6.5
2015-03-12 18:56:53 +00:00
David Baker
04f8478aaa
Add the master push rule for the break-my-push button. Allow server default rules to be disabled by default.
2015-03-10 17:26:25 +00:00
David Baker
92b3dc3219
Merge branch 'develop' into pushrules2
2015-03-04 14:56:41 +00:00
David Baker
6fab7bd2c1
s/user_name/user/ as per mjark's comment
2015-03-02 18:17:19 +00:00
David Baker
09f9e8493c
Oops, missed a replacement.
2015-03-02 17:37:22 +00:00
David Baker
20436cdf75
Blank lines
2015-03-02 15:58:12 +00:00
David Baker
2a6dedd7cc
It's set_tweak now, not set_sound
2015-02-27 18:38:56 +00:00
Kegan Dougal
16b90764ad
Convert expected format for AS regex to include exclusivity.
...
Previously you just specified the regex as a string, now it expects a JSON
object with a 'regex' key and an 'exclusive' boolean, as per spec.
2015-02-27 10:44:32 +00:00
David Baker
1959088156
Add API for getting/setting enabled-ness of push rules.
2015-02-26 18:07:44 +00:00
David Baker
a025055643
SYWEB-278 Don't allow rules with no rule_id.
2015-02-25 14:02:38 +00:00
Erik Johnston
15e2d7e387
Always allow AS to register
2015-02-20 11:39:53 +00:00
Erik Johnston
0722f982d3
Disable registration if config option was set.
2015-02-19 14:22:20 +00:00
Mark Haines
6375bd3e33
SYN-282: Don't log tracebacks for client errors
2015-02-18 12:01:37 +00:00
Mark Haines
0d872f5aa6
Merge pull request #50 from matrix-org/application-services
...
Application Services
2015-02-13 15:06:14 +00:00
Erik Johnston
4ebbaf0d43
Blunty replace json with simplejson
2015-02-11 14:23:10 +00:00
Kegan Dougal
14d413752b
Fix newline on __init__
2015-02-11 10:53:47 +00:00
Kegan Dougal
fd40d992ad
PEP8-ify
2015-02-11 10:41:33 +00:00
Kegan Dougal
8beb613916
Add newline to EOF
2015-02-11 10:36:48 +00:00
Kegan Dougal
c7783d6fee
Notify ASes for events sent by other users in a room which an AS user is a part of.
2015-02-11 10:36:08 +00:00
Kegan Dougal
9978c5c103
Merge branch 'develop' into application-services
2015-02-11 10:03:24 +00:00
Mark Haines
84a769cdb7
Fix code-style
2015-02-10 17:58:36 +00:00
Mark Haines
b085fac735
Code-style fixes
2015-02-10 16:30:48 +00:00
Kegan Dougal
53557fc532
Merge branch 'develop' into application-services
2015-02-09 15:20:56 +00:00
Erik Johnston
24cc6979fb
Log when we receive a request, when we send a response and how long it took to process it.
2015-02-09 13:46:22 +00:00
Matthew Hodgson
582019f870
...and here's the actual impl. git fail.
2015-02-07 13:32:14 +00:00
Matthew Hodgson
e117bc3fc5
thou shalt specify a content-length
2015-02-07 12:56:21 +00:00
Matthew Hodgson
34c39398fa
i hate weakly typed languages
2015-02-07 12:55:13 +00:00
Kegan Dougal
c3ae8def75
Grant ASes the ability to delete aliases in their own namespace.
2015-02-06 11:32:07 +00:00
Kegan Dougal
e426df8e10
Grant ASes the ability to create alias in their own namespace.
...
Add a new errcode type M_EXCLUSIVE when users try to create aliases inside
AS namespaces, and when ASes try to create aliases outside their own
namespace.
2015-02-06 10:57:14 +00:00
Kegan Dougal
0227618d3c
Add m.login.application_service registration procedure.
...
This allows known application services to register any user ID under their
own user namespace(s).
2015-02-05 17:29:27 +00:00
Kegan Dougal
c20281ee33
Merge branch 'develop' into application-services
2015-02-05 16:11:34 +00:00
David Baker
a93fa42bce
priority class now dealt with in namespaced rule_id
2015-02-05 15:45:16 +00:00
Kegan Dougal
fc8bcc809d
Merge branch 'develop' into application-services
2015-02-05 15:32:45 +00:00
David Baker
aaf50bf6f3
Give server default rules the 'default' attribute and fix various brokenness.
2015-02-05 15:11:38 +00:00
David Baker
2df41aa138
Server default rules now of all kinds rather than all being at lowest prio.
2015-02-05 14:46:37 +00:00
David Baker
f90782a658
namespace rule IDs to be unique within their scope and rule type.
2015-02-05 14:46:37 +00:00
Kegan Dougal
951690e54d
Merge branch 'develop' into application-services
2015-02-05 14:28:03 +00:00
Kegan Dougal
27091f146a
Add hs_token column and generate a different token f.e application service.
2015-02-05 10:08: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
David Baker
dc7bb70f22
s/instance_handle/profile_tag/
2015-02-03 16:51:07 +00:00
Mark Haines
1bb0528316
Add Cache-Control header to identicon
2015-02-02 16:57:26 +00:00
Mark Haines
f2eda123b7
Fix setting identicon width and height
2015-02-02 16:32:33 +00:00
Mark Haines
038f5afb07
Spell height more correctly
2015-02-02 16:29:18 +00:00
Mark Haines
22c1ffb0a0
Add a media/v1/identicon resource for generating identicons using pydenticon
2015-02-02 16:02:31 +00:00
Kegan Dougal
c059c9fea5
Merge branch 'develop' into application-services
...
Conflicts:
synapse/handlers/__init__.py
synapse/storage/__init__.py
2015-02-02 15:57:59 +00:00
David Baker
b4b892f4a3
Spit out server default rules too.
2015-01-30 15:54:51 +00:00
Mark Haines
6dc92d3427
Merge pull request #41 from matrix-org/client_v2_sync
...
Client v2 sync
2015-01-30 15:54:25 +00:00
David Baker
4ffac34a64
Add glob asterisks when running rules.
...
Means that now you can't do exact matches even in override rules,
but I think we can live with that. Advantage is that you'll now
always get back what was put in to the API.
2015-01-30 15:03:56 +00:00
Erik Johnston
471c47441d
Merge pull request #37 from matrix-org/client_v2_filter
...
Client v2 filter
2015-01-30 14:56:08 +00:00
Mark Haines
4a67834bc8
Pass client info to the sync_config
2015-01-30 11:50:15 +00:00
Mark Haines
22dd1cde2d
Filter the recent events before applying the limit when doing an incremental sync with a gap
2015-01-30 11:32:35 +00:00
Mark Haines
365a186729
Add basic filtering support
2015-01-29 18:11:28 +00:00
Mark Haines
7ceda8bf3d
Merge branch 'client_v2_filter' into client_v2_sync
2015-01-29 18:04:07 +00:00
Mark Haines
93ed31dda2
Create a separate filter object to do the actual filtering, so that we can
...
split the storage and management of filters from the actual filter code
and don't have to load a filter from the db each time we filter an event
2015-01-29 17:45:07 +00:00
David Baker
4bdfce30d7
Renumber priority classes so we can use 0 for defaults.
2015-01-29 17:12:11 +00:00
David Baker
e0d2c6889b
Allow kind to be set to null to delete a pusher.
2015-01-29 17:05:00 +00:00
Mark Haines
722b65f461
Move typing notifs to an "emphermal" event list on the room object
2015-01-29 16:41:21 +00:00
Mark Haines
8e571cbed8
Merge branch 'client_v2_filter' into client_v2_sync
2015-01-29 16:18:59 +00:00
Mark Haines
295322048d
Merge branch 'develop' into client_v2_filter
2015-01-29 16:18:34 +00:00
Mark Haines
acb68a39e0
Code style fixes.
2015-01-29 16:12:40 +00:00
Mark Haines
cf7c54ec93
Merge branch 'client_v2_filter' into client_v2_sync
2015-01-29 15:55:58 +00:00
Mark Haines
33391db5f8
Merge in auth changes from develop
2015-01-29 15:54:54 +00:00
Mark Haines
396a67a09a
Merge branch 'client_v2_filter' into client_v2_sync
...
Conflicts:
synapse/rest/client/v2_alpha/__init__.py
2015-01-29 14:58:00 +00:00
Mark Haines
9d8f798a3f
Merge changes from develop
2015-01-29 14:55:27 +00:00
Mark Haines
3dbce6f4a5
Add typing notifications to sync
2015-01-29 03:33:51 +00:00
Mark Haines
b9c442c85c
Include transaction ids in unsigned section of events in the sync results for the clients that made those requests
2015-01-29 02:46:00 +00:00
David Baker
8552ed8df2
Change uses of get_user_by_req because it returns a tuple now.
2015-01-28 18:04:40 +00:00
Mark Haines
c81a19552f
Add ports back to demo/start.sh
2015-01-28 17:32:49 +00:00
Mark Haines
9c61556504
Merge branch 'develop' into client_v2_sync
2015-01-28 17:29:30 +00:00
Mark Haines
26c8fff19e
Merge pull request #36 from matrix-org/device_id_from_access_token
...
Extract the device id and token id from the access token when autheniticating users
2015-01-28 17:19:28 +00:00
Mark Haines
388581e087
Extract the id token of the token when authing users, include the token and device_id in the internal meta data for the event along with the transaction id when sending events
2015-01-28 16:58:23 +00:00
Kegan Dougal
c23e3db544
Add filter JSON sanity checks.
2015-01-28 16:45:18 +00:00
Mark Haines
c59bcabf0b
Return the device_id from get_auth_by_req
2015-01-28 15:43:41 +00:00
David Baker
2cfdfee572
spaces
2015-01-28 14:41:51 +00:00
David Baker
289a249874
Unnecessary newlines.
2015-01-28 14:39:03 +00:00
David Baker
3cb5b73c0d
Unnecessary newline.
2015-01-28 14:37:55 +00:00
David Baker
8807f4170e
Better style
2015-01-28 14:35:00 +00:00
David Baker
032f8d4ed3
Another superfluous newline
2015-01-28 14:33:15 +00:00
David Baker
d93ce29a86
Ah, the comma of doom.
2015-01-28 14:27:01 +00:00
David Baker
6741c3dbd9
Brackets are nicer
2015-01-28 14:26:03 +00:00
David Baker
4fbf2328c2
Unnecessary new line
2015-01-28 14:24:28 +00:00
David Baker
20c47383dc
Oops, bad merge: needed to change the base class of the rest servlets too.
2015-01-28 14:10:46 +00:00
David Baker
c291a4d522
Merge branch 'develop' into pushers
...
Conflicts:
synapse/handlers/events.py
synapse/server.py
2015-01-28 12:51:05 +00:00
Kegan Dougal
42876969b9
Add basic application_services SQL, and hook up parts of the appservice store to read from it.
2015-01-28 11:59:38 +00:00
Mark Haines
e020574d65
Fix Formatting
2015-01-27 20:19:36 +00:00
Kegan Dougal
ec3719b583
Use ApplicationService when registering.
2015-01-27 17:15:06 +00:00
Paul "LeoNerd" Evans
059651efa1
Have the Filtering API return Deferreds, so we can do the Datastore implementation nicely
2015-01-27 16:17:56 +00:00
Kegan Dougal
51449e0665
Add appservice handler and store. Glue together rest > handler > store.
2015-01-27 15:50:28 +00:00
Kegan Dougal
6efdc11cc8
Parse /register and /unregister request JSON.
2015-01-27 15:03:19 +00:00
Paul "LeoNerd" Evans
05c7cba73a
Initial trivial implementation of an actual 'Filtering' object; move storage of user filters into there
2015-01-27 14:28:56 +00:00
Kegan Dougal
fa8e6ff900
Add stub application services REST API.
2015-01-27 14:01:51 +00:00
Paul "LeoNerd" Evans
0484d7f6e9
Merge branch 'develop' into client_v2_filter
2015-01-27 13:11:03 +00:00
Mark Haines
436513068d
Start implementing the non-incremental sync portion of the v2 /sync API
2015-01-26 18:53:31 +00:00
Mark Haines
3186c5bdbc
Merge branch 'develop' into client_v2_sync
2015-01-26 16:32:40 +00:00
Mark Haines
7f6f3f9d62
Pass the current time to serialize event, rather than passing an
...
HS and getting a clock from it and calling time_msec on the clock.
Remove the serialize_event method from the HS since it is no longer
needed.
2015-01-26 16:11:28 +00:00
Paul "LeoNerd" Evans
8d7accb28f
Initial minimal attempt at /user/:user_id/filter API - in-memory storage, no actual filter implementation
2015-01-26 14:33:30 +00:00
Mark Haines
7b814d3f7f
Add client v2_alpha resource to synapse server resource tree
2015-01-23 18:55:19 +00:00
Mark Haines
e26340cee7
Start implementing the v2_alpha sync API
2015-01-23 18:48:17 +00:00
David Baker
5f84ba8ea1
Add API to delete push rules.
2015-01-23 17:49:37 +00:00
David Baker
f21f9fa3c5
Use push settings!
2015-01-23 17:07:06 +00:00
Mark Haines
4be637cb12
Extract the client v1 base RestServlet to a separate class
2015-01-23 14:09:51 +00:00
David Baker
b3f66ea6fb
more pep8
2015-01-23 13:28:00 +00:00
David Baker
d3e72b4d87
Make string format tuple an actual tuple
2015-01-23 13:25:58 +00:00
David Baker
98e1080555
redundant parens
2015-01-23 13:25:36 +00:00
David Baker
54c689c819
stray space
2015-01-23 13:25:14 +00:00
David Baker
6188c4f69c
make per-device rules work
2015-01-23 13:23:10 +00:00
Mark Haines
ada711504e
Replace hs.parse_roomalias with RoomAlias.from_string
2015-01-23 13:21:58 +00:00
Mark Haines
1c06c48ce2
Replace hs.parse_roomid with RoomID.from_string
2015-01-23 11:55:12 +00:00
Mark Haines
5759bec43c
Replace hs.parse_userid with UserID.from_string
2015-01-23 11:47:15 +00:00
David Baker
49fe31792b
Add slightly pedantic trailing slash error.
2015-01-23 11:19:02 +00:00
Mark Haines
7256def8e4
Merge rest servlets into the client json resource object
2015-01-23 10:37:38 +00:00
David Baker
bcd48b9636
Fix adding rules without before/after & add the rule that we couldn't find to the error
2015-01-23 10:28:25 +00:00
David Baker
6927b6b197
This really serves me right for ever making a map called 'map'.
2015-01-23 10:21:47 +00:00
David Baker
8a850573c9
As yet fairly untested GET API for push rules
2015-01-22 19:32:17 +00:00
David Baker
5c6189ea3e
Merge branch 'develop' into pushers
...
Conflicts:
synapse/rest/__init__.py
2015-01-22 17:46:16 +00:00
David Baker
ede491b4e0
Oops: second part of commit dc938606
2015-01-22 17:38:53 +00:00
David Baker
dc93860619
Add rest API & store for creating push rules
...
Also make unrecognised request error look more like synapse errors
because it makes it easier to throw them from within rest classes.
2015-01-22 17:37:12 +00:00
Mark Haines
97c68c508d
Move rest APIs back under the rest directory
2015-01-22 16:10:07 +00:00
Mark Haines
1d2016b4a8
Move client v1 api rest servlets into a "client/v1" directory
2015-01-22 14:59:08 +00:00
David Baker
afb714f7be
add instance_handles to pushers so we have a way to refer to them even if the push token changes.
2015-01-20 11:49:48 +00:00
David Baker
2d2953cf5f
Require device language when adding a pusher.
...
Because this seems like it might be useful to do sooner rather
than later.
2015-01-16 11:24:10 +00:00
Paul "LeoNerd" Evans
34a5fbe2b7
Have /join/:room_id return the room ID in response anyway, for consistency of clients (SYN-234)
2015-01-13 17:29:24 +00:00
David Baker
c06a9063e1
Merge branch 'develop' into pushers
2015-01-13 13:15:51 +00:00
Kegan Dougal
b5924cae04
Add raw query param for scrollback.
2015-01-08 14:37:55 +00:00
Kegan Dougal
edb557b2ad
Return the raw federation event rather than adding extra keys for federation data.
2015-01-08 14:28:08 +00:00
Kegan Dougal
5720ab59e0
Add 'raw' query parameter to expose the event graph and signatures to savvy clients.
2015-01-08 13:57:40 +00:00
Mark Haines
adb04b1e57
Update copyright notices
2015-01-06 13:21:39 +00:00
David Baker
b56730bb6e
Merge branch 'develop' into pushers
...
Conflicts:
synapse/api/errors.py
synapse/server.py
synapse/storage/__init__.py
2014-12-18 15:15:22 +00:00
David Baker
0a6664493a
Merge branch 'master' into pushers
2014-12-18 15:06:11 +00:00
David Baker
9728c305a3
after a few rethinks, a working implementation of pushers.
2014-12-18 14:49:22 +00:00
Mark Haines
3c7857e49b
clean up coding style a bit
2014-12-16 15:24:03 +00:00
Erik Johnston
3c77d13aa5
Kill off synapse.api.events.*
2014-12-16 11:29:05 +00:00
Erik Johnston
cf6e5f1dbf
Rename MessageHandler.handle_event. Add a few comments.
2014-12-15 17:01:12 +00:00
Erik Johnston
57e0e619f3
Merge branch 'develop' of github.com:matrix-org/synapse into events_refactor
...
Conflicts:
tests/handlers/test_room.py
2014-12-15 14:45:59 +00:00
Erik Johnston
23c7cb6220
Remove unused imports
2014-12-12 16:31:59 +00:00
Erik Johnston
7b43a503f3
Consistently url decode and decode as utf 8 the URL parts
2014-12-12 15:05:37 +00:00
Paul "LeoNerd" Evans
0ca072b3b6
Initial tiny hack at REST API for setting room typing notification status
2014-12-11 10:55:36 +00:00
Erik Johnston
cabead6194
Actually fix bug when uploading state with empty state_key
2014-12-10 14:49:52 +00:00
Erik Johnston
02db7eb209
Fix bug when uploading state with empty state_key
2014-12-10 14:02:48 +00:00
Erik Johnston
aae8a37e63
Merge branch 'develop' of github.com:matrix-org/synapse into events_refactor
2014-12-10 13:18:40 +00:00
Erik Johnston
a295a3c691
Fix registration
2014-12-08 09:24:37 +00:00
Matthew Hodgson
aed62a3583
track replication destination health, and perform exponential back-off when sending transactions. does *not* yet retry transactions, but drops them on the floor if waiting for a server to recover.
2014-12-07 02:26:07 +00:00
Erik Johnston
c31dba86ec
Convert rest and handlers to use new event structure
2014-12-04 15:50:01 +00:00
David Baker
88af58d41d
Update to app_id / app_instance_id (partially) and mangle to be PEP8 compliant.
2014-12-03 13:37:02 +00:00
Erik Johnston
6941a19715
Merge branch 'develop' of github.com:matrix-org/synapse into events_refactor
2014-12-03 11:56:49 +00:00
Paul "LeoNerd" Evans
afb646dc1e
Allow GET /room/:room_id/messages without 'limit' parameter to default to 10
2014-12-02 18:01:16 +00:00
David Baker
7642d95d5e
Merge branch 'develop' into pushers
2014-12-02 13:50:05 +00:00
Erik Johnston
9d53228158
Change DomainSpecificString so that it doesn't use a HomeServer object
2014-12-02 10:42:28 +00:00
Kegan Dougal
3536fd7d60
Don't double url-decode state event types.
2014-11-25 11:02:19 +00:00
David Baker
58f82e2e54
Merge branch 'develop' into pushers
2014-11-20 18:25:31 +00:00
David Baker
23465a30b6
Merge branch 'develop' into pushers
2014-11-20 18:17:46 +00:00
Mark Haines
610c2ea131
Fix pep8 and pyflakes warnings
2014-11-20 18:00:10 +00:00
David Baker
f1c7f8e813
Merge branch 'develop' into http_client_refactor
2014-11-20 17:49:48 +00:00
David Baker
e377d33652
Separate out the matrix http client completely because just about all of its code it now separate from the simple case we need for standard HTTP(S)
2014-11-20 17:41:56 +00:00
Mark Haines
db9ce032a4
Fix pep8 codestyle warnings
2014-11-20 17:26:36 +00:00
Mark Haines
32090aee16
Add a few missing yields, Move deferred lists inside PreserveLoggingContext because they don't interact well with the logging contexts
2014-11-20 16:24:00 +00:00
David Baker
74c3879760
Start creating a module to do generic notifications (just prints them to stdout currently!)
2014-11-19 18:20:59 +00:00
Paul "LeoNerd" Evans
572a1ca42a
Remember also to UTF-8 decode bytes in room alias names in directory server URLs
2014-11-18 18:06:35 +00:00
Paul "LeoNerd" Evans
3bfc3dd45b
Remember to URL decode the room_id in room initialSync
2014-11-18 17:44:55 +00:00
Paul "LeoNerd" Evans
88dfa7baa6
Ensure to parse a real pagination config object out of room initialSync request and pass it on
2014-11-18 16:34:43 +00:00
Paul "LeoNerd" Evans
75e95c45a2
Rename message handler's new snapshot_room to room_initial_sync() as that better suits its purpose
2014-11-18 16:02:44 +00:00
Paul "LeoNerd" Evans
e9f587ecba
Merge remote-tracking branch 'origin/develop' into room-initial-sync
2014-11-18 15:48:30 +00:00
Mark Haines
a5b88c489e
Split out sending the room alias events from creating the alias so that we can do them in the right point when creating a room
2014-11-18 15:03:13 +00:00
Paul "LeoNerd" Evans
31a049eb69
Merge branch 'develop' into room-initial-sync
...
Conflicts:
synapse/handlers/message.py
2014-11-17 16:59:24 +00:00
Paul "LeoNerd" Evans
269f80bf8e
Have room initialSync return the room's room_id
2014-11-10 19:02:19 +00:00
Erik Johnston
a8e565eca8
Add an EventValidator. Fix bugs in auth ++ storage
2014-11-10 18:25:42 +00:00
Erik Johnston
3cb678f84c
Merge branch 'develop' of github.com:matrix-org/synapse into federation_authorization
2014-11-07 10:55:28 +00:00
Erik Johnston
4317c8e583
Implement new replace_state and changed prev_state
...
`prev_state` is now a list of previous state ids, similiar to
prev_events. `replace_state` now points to what we think was replaced.
2014-11-06 15:10:55 +00:00
Kegan Dougal
d3a02ec038
Fix url decoding bugs with /redact and /send APIs.
2014-11-05 12:05:11 +00:00
Kegan Dougal
9f6d1b10ad
Be sure to urlencode/decode event types correctly in both the web client and HS.
2014-11-05 11:21:55 +00:00
Erik Johnston
ef9c4476a0
Merge branch 'develop' of github.com:matrix-org/synapse into federation_authorization
2014-10-30 11:18:28 +00:00
Mark Haines
7d709542ca
Fix pep8 warnings
2014-10-30 11:10:17 +00:00
Erik Johnston
ad9226eeec
Merge branch 'event_signing' of github.com:matrix-org/synapse into federation_authorization
...
Conflicts:
synapse/storage/__init__.py
2014-10-27 11:58:32 +00:00
Mark Haines
d56e389a95
Fix pyflakes warnings
2014-10-27 10:33:17 +00:00
Erik Johnston
bb4a20174c
Merge branch 'develop' of github.com:matrix-org/synapse into federation_authorization
...
Conflicts:
synapse/federation/transport.py
synapse/handlers/message.py
2014-10-27 10:20:44 +00:00
David Baker
51edfeb3d0
Coturn's timestamps are in seconds, not milliseconds
2014-10-21 18:57:13 +01:00
Erik Johnston
5ffe5ab43f
Use state groups to get current state. Make join dance actually work.
2014-10-17 18:56:42 +01:00
Paul "LeoNerd" Evans
13b560971e
Make sure to return an empty JSON object ({}) from presence PUT/POST requests rather than an empty string ("") because most deserialisers won't like the latter
2014-10-14 16:48:15 +01:00
Erik Johnston
e06adc6d7e
SYN-2: Allow server admins to delete room aliases
2014-09-30 11:31:42 +01:00
Erik Johnston
1132663cc7
SYN-48: Fix typo. Get the whois for requested user rather tahan the requester
2014-09-29 15:04:04 +01:00
Erik Johnston
3ccb17ce59
SYN-48: Implement WHOIS rest servlet
2014-09-29 14:59:52 +01:00
Erik Johnston
0fdf308874
Track the IP users connect with. Add an admin column to users table.
2014-09-26 16:36:24 +01:00
Erik Johnston
37bfe44046
Merge branch 'deletions' of github.com:matrix-org/synapse into develop
2014-09-25 17:02:53 +01:00
David Baker
c58eb0d5a3
Merge branch 'turn' into develop
2014-09-25 13:09:56 +01:00
David Baker
a31bf77776
Make turn server endpoint return an empty object if no turn servers to
...
match the normal response. Don't break if the turn_uris option isn't
present.
2014-09-25 11:24:49 +02:00
David Baker
7dc7c53029
The REST API spec only alows for returning a single server so name the
...
endpoint appropriately.
2014-09-24 17:28:47 +02:00
David Baker
4553651138
Oops
2014-09-24 17:04:33 +02:00
David Baker
5383ba5587
rename endpoint to better reflect what it is and allow specifying multiple uris
2014-09-24 16:01:36 +01:00
Erik Johnston
70899d3ab2
Rename deletions to redactions
2014-09-24 15:27:59 +01:00
David Baker
b42b0d3fe5
Use standard base64 encoding with padding to get the same result as
...
coturn.
2014-09-24 15:29:24 +02:00
Paul "LeoNerd" Evans
a7d53227de
Bugfix for older Pythons that lack hmac.compare_digest()
2014-09-23 19:07:16 +01:00
David Baker
c96ab4fcbb
The config is not hierarchical
2014-09-23 19:17:24 +02:00
David Baker
14ed6799d7
Add support for TURN servers as per the TURN REST API ( http://tools.ietf.org/html/draft-uberti-behave-turn-rest-00 )
2014-09-23 17:16:13 +01:00
Paul "LeoNerd" Evans
c0673c50e6
Merge branch 'jira/SYN-60' into develop
2014-09-23 16:15:54 +01:00
Paul "LeoNerd" Evans
c03176af59
Send an HMAC(SHA1) protecting the User ID for the ReCAPTCHA bypass, rather than simply the secret itself, so it's useless if that HMAC leaks
2014-09-23 15:58:44 +01:00
Kegan Dougal
0c4ae63ad5
Implemented /rooms/$roomid/state API.
2014-09-23 15:35:58 +01:00
Erik Johnston
78af6bbb98
Add m.room.deletion. If an event is deleted it will be returned to clients 'pruned', i.e. all client specified keys will be removed.
2014-09-23 15:28:32 +01:00
Paul "LeoNerd" Evans
537c7e1137
Config values are almost never 'None', but they might be empty string. Detect their presence by truth
2014-09-23 15:18:59 +01:00
Paul "LeoNerd" Evans
5f16439752
Make sure the config actually /has/ a captcha_bypass_secret set before trying to compare it
2014-09-23 15:16:47 +01:00
Paul "LeoNerd" Evans
3a8a94448a
Allow a (hidden undocumented) key to m.login.recaptcha to specify a shared secret to allow bots to bypass the ReCAPTCHA test (SYN-60)
2014-09-23 14:29:08 +01:00
Kegan Dougal
c099b36af3
Comment out password reset for now, until the mechanism is fully discussed (IS token auth vs HS auth)
2014-09-16 13:32:33 +01:00
Kegan Dougal
5f30a69a9e
Added PasswordResetRestServlet. Hit the IS to confirm the email/user. Need to send email.
2014-09-16 11:22:40 +01:00
Kegan Dougal
34d7896b06
More helpful 400 error messages.
2014-09-15 16:05:51 +01:00
Kegan Dougal
2c00e1ecd9
Be consistent when associating keys with login types for registration/login.
2014-09-15 15:38:29 +01:00
Kegan Dougal
14bc4ed59f
Merge branch 'develop' of github.com:matrix-org/synapse into registration-api-changes in preparation for re-merge to develop.
2014-09-15 15:27:58 +01:00
Kegan Dougal
04fbda46dd
Make captcha work again with the new registration logic.
2014-09-15 14:52:39 +01:00
Erik Johnston
5bd9369a62
Correctly handle the 'age' key in events and pdus
2014-09-15 13:26:11 +01:00
Kegan Dougal
285ecaacd0
Split out password/captcha/email logic.
2014-09-15 12:42:36 +01:00
Kegan Dougal
34878bc26a
Added LoginType constants. Created general structure for processing registrations.
2014-09-15 10:23:20 +01:00
Kegan Dougal
1a298aad9c
Added captcha support on both the HS and web client.
...
Merge branch 'captcha' of github.com:matrix-org/synapse into develop
2014-09-05 23:32:51 -07:00
Kegan Dougal
3ea6f01b4e
80 chars please
2014-09-05 22:55:29 -07:00
Kegan Dougal
37e53513b6
Add config opion for XFF headers when performing ReCaptcha auth.
2014-09-05 22:51:11 -07:00
Kegan Dougal
1829b55bb0
Captchas now work on registration. Missing x-forwarded-for config arg support. Missing reloading a new captcha on the web client / displaying a sensible error message.
2014-09-05 19:18:23 -07:00
Kegan Dougal
0b9e1e7b56
Added a captcha config to the HS, to enable registration captcha checking and for the recaptcha private key.
2014-09-05 17:58:06 -07:00
Erik Johnston
9dd4570b68
Generate m.room.aliases event when the HS creates a room alias
2014-09-05 21:35:56 +01:00
Erik Johnston
982604fbf2
Empty string is not a valid JSON object, so don't return them in HTTP responses.
2014-09-05 17:13:26 +01:00
David Baker
d72ce4da64
Merge branch 'develop' of github.com:matrix-org/synapse into develop
...
Conflicts:
synapse/http/client.py
2014-09-03 18:25:17 +01:00
David Baker
d6ecbbdf0a
Add support for registering with a threepid to the HS (get credentials from the client and check them against an ID server).
2014-09-03 18:22:27 +01:00
Erik Johnston
1b491e50c9
Implement a kick api
2014-09-03 17:46:52 +01:00
Matthew Hodgson
8a7c1d6a00
fix the copyright holder from matrix.org to OpenMarket Ltd, as matrix.org hasn't been incorporated in time for launch.
2014-09-03 17:31:57 +01:00
Kegan Dougal
beaf50f5c6
Bubble up SynapseErrors so expected failures aren't masked.
2014-09-03 16:31:01 +01:00
Kegan Dougal
581c54bebe
Add exception handling to directory servlet, so we don't 500. Mark directory API as volatile in the api docs.
2014-09-03 16:27:01 +01:00
Erik Johnston
30bcbc433a
Fix up directory server to not require uploading room hosts. Update the room hosts table with the current room hosts (if we have them) on GET.
2014-09-03 16:04:27 +01:00
Paul "LeoNerd" Evans
cda31fb755
Kill the state
...
... key from all the Presence messages
2014-09-03 15:37:10 +01:00
Kegan Dougal
dfea1730dc
apidocs: mtime_age > last_active_ago. Presence REST: Sanity check values in invite/drop arrays.
2014-09-03 12:09:20 +01:00
Kegan Dougal
10afd895c4
Edited /presence REST servlet to raise SynapseErrors to return a standard error response, rather than a string.
2014-09-03 11:56:47 +01:00
Kegan Dougal
acfabfff9c
Fixed /presence APIs to urldecode user IDs.
2014-09-03 11:31:48 +01:00
Kegan Dougal
2385d396c3
URL decode user IDs for /profile REST path segments.
2014-09-03 11:05:29 +01:00
Kegan Dougal
c77add6d21
Add ban support: /rooms/$roomid/ban with { user_id : foo }
2014-09-03 09:43:32 +01:00
Paul "LeoNerd" Evans
aa337f588c
Order matters when adding REST servlets
2014-09-02 12:53:36 +01:00
David Baker
5c778f2f15
Add rest endpoint for the whole user profile
2014-09-02 11:49:17 +01:00
Paul "LeoNerd" Evans
02f4e3b3ff
Rename 'state' presence key to the much more obvious 'presence'; maintain a legacy 'state' copy for now
2014-09-01 14:45:41 +01:00
Kegan Dougal
8d7d251c35
Support multiple login flows when deciding how to login. Updated cmdclient and spec. Webclient doesn't need updating for this.
2014-08-28 14:56:55 +01:00
Erik Johnston
7c89d5e97a
Merge branch 'develop' of github.com:matrix-org/synapse into develop
2014-08-27 17:05:48 +01:00
Kegan Dougal
f64887e15c
Added RestServlet for /rooms/$roomid/initialSync
2014-08-27 16:49:01 +01:00
Kegan Dougal
4e8d19ee2b
Added RestServlet for /rooms/$roomid/state
2014-08-27 16:42:33 +01:00
Erik Johnston
08881d808d
Merge branch 'develop' of github.com:matrix-org/synapse into stream_refactor
2014-08-27 15:34:01 +01:00
Kegan Dougal
c585c87c4b
Renamed /ds to /directory
2014-08-27 14:54:29 +01:00
Kegan Dougal
1d9d287c7c
Renamed /public/rooms to /publicRooms
2014-08-27 14:52:07 +01:00
Erik Johnston
47519cd8c2
Merge branch 'develop' of github.com:matrix-org/synapse into stream_refactor
...
Conflicts:
synapse/handlers/events.py
synapse/rest/events.py
synapse/rest/room.py
2014-08-27 14:13:06 +01:00
Kegan Dougal
135a1aa229
Final url modifications: renamed /presence_list to /presence/list to keep the top-level namespace clean. Updated tests.
2014-08-27 11:37:53 +01:00
Kegan Dougal
dd661769e1
Renamed /rooms to /createRoom. Removed ability to PUT raw room IDs, and removed tests which tested that. Updated cmdclient and webclient.
2014-08-27 11:33:56 +01:00
Kegan Dougal
c65885e166
Added support for GET /events/$eventid with auth checks.
2014-08-27 10:33:01 +01:00
Kegan Dougal
dfa0cd1d90
Modified /join/$identifier to support $identifier being a room ID in addition to a room alias.
2014-08-27 09:43:42 +01:00
Erik Johnston
93cff1668c
Merge branch 'develop' of github.com:matrix-org/synapse into stream_refactor
2014-08-26 18:57:55 +01:00
Erik Johnston
3a2a5b959c
WIP: Completely change how event streaming and pagination work. This reflects the change in the underlying storage model.
2014-08-26 18:57:46 +01:00
Kegan Dougal
f84ddc75cb
Pepper UT TODOs
2014-08-26 17:54:18 +01:00
Kegan Dougal
5a3df1d029
Feedback: Removed FeedbackRestServlet. Modified keys on FeedbackEvent. Expanded the feedback constants to fully explain what type of feedback they are.
2014-08-26 17:49:46 +01:00
Kegan Dougal
5a93bfe1f0
Removed MessageRestServlet, use RoomSendEventRestServlet instead. Updated cmdclient, tests and webclient. All appears to work.
2014-08-26 17:21:48 +01:00
Kegan Dougal
ad6d5ac06c
Added RoomSendEventRestServlet to send generic non-state events. It even appears to work..!
2014-08-26 17:00:24 +01:00
Kegan Dougal
2e70de09b9
Renaming: /im/sync >> /initialSync. /rooms/$roomid/members/list >> /rooms/$roomid/members. /rooms$roomid/messages/list >> /room/$roomid/messages. Updated cmdclient, tests and webclient.
2014-08-26 16:19:17 +01:00
Mark Haines
ac21dfff6d
Fix pyflakes errors
2014-08-26 16:02:59 +01:00
Kegan Dougal
5c0be8fde3
Implemented /rooms/$roomid/[invite|join|leave] with POST / PUT (incl txn ids)
2014-08-26 14:49:44 +01:00
Kegan Dougal
732d954f89
Added basic in-memory REST transaction storage. Only the latest transaction for a given path/access_token combo is stored in order to prevent storing ALL request/response pairs.
2014-08-26 14:13:32 +01:00
Kegan Dougal
7d79021c42
Added servlet for /rooms/$roomid/[invite|join|leave]
2014-08-26 12:54:43 +01:00
Kegan Dougal
5796232cb1
Adjusted webclient to use new state paths. Updated membership msg template to actually show the person invited. Factored out common membership functions in matrix service.
2014-08-26 10:24:47 +01:00
Kegan Dougal
47c3a089c5
Merge branch 'develop' of github.com:matrix-org/synapse into client_server_url_rename
2014-08-26 09:26:33 +01:00
Kegan Dougal
cab3095803
Removed member list servlet: now using generic state paths.
2014-08-26 09:26:07 +01:00
Erik Johnston
a9a5329a11
Encode unicode from json as utf-8. This was required to allow people to register on my laptop
2014-08-24 11:29:29 +01:00
Kegan Dougal
f690b7b827
Impl: /rooms/roomid/state/eventtype/state_key - Renamed RoomTopicRestServlet to RoomStateEventRestServlet. Support generic state event sending.
2014-08-22 15:59:15 +01:00
Paul "LeoNerd" Evans
9c0e570496
Kill the "_homeserver_" injected messages for room membership changes
2014-08-20 16:06:47 +01:00
Erik Johnston
347242a5c4
Merge branch 'master' of github.com:matrix-org/synapse into sql_refactor
...
Conflicts:
tests/rest/test_presence.py
tests/rest/test_rooms.py
tests/utils.py
2014-08-19 14:48:19 +01:00
Erik Johnston
75b6d982a0
Add a 'backfill room' button
2014-08-19 14:20:03 +01:00
Kegan Dougal
caef65d819
More unquotes. Also, don't return the room_id on membership state changes, they already know it.
2014-08-19 12:30:28 +01:00
Kegan Dougal
ece7a6d995
Unquote sender IDs.
2014-08-19 11:50:57 +01:00
Erik Johnston
b4a1f2ccb5
Merge branch 'master' of github.com:matrix-org/synapse into sql_refactor
2014-08-18 15:53:40 +01:00
Kegan Dougal
b37ced8f63
Update the default longpoll timeout time.
2014-08-18 14:30:07 +01:00