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
Mark Haines
a4b06b619c
Add a couple more checks to the keyring
2016-07-26 19:50:11 +01:00
Mark Haines
c63b1697f4
Merge pull request #952 from matrix-org/markjh/more_fixes
...
Check if the user is banned when handling 3pid invites
2016-07-26 19:20:56 +01:00
Mark Haines
87ffd21b29
Fix a couple of bugs in the transaction and keyring code
2016-07-26 19:19:08 +01:00
Richard van der Hoff
2452611d0f
Merge pull request #953 from matrix-org/rav/requester
...
Add `create_requester` function
2016-07-26 16:57:53 +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
Mark Haines
c824b29e77
Check if the user is banned when handling 3pid invites
2016-07-26 16:39:14 +01:00
Richard van der Hoff
33d7776473
Fix typo
2016-07-26 13:32:15 +01:00
Richard van der Hoff
9ad8d9b17c
Merge branch 'develop' into rav/delete_refreshtoken_on_delete_device
2016-07-26 13:29:46 +01:00
Richard van der Hoff
5b1825ba5b
Merge pull request #951 from matrix-org/rav/flake8
...
Fix flake8 noise
2016-07-26 13:27:54 +01:00
Mark Haines
9c4cf83259
Merge pull request #948 from matrix-org/markjh/auth_fixes
...
Don't add rejections to the state_group, persist all rejections
2016-07-26 13:22:57 +01:00
Richard van der Hoff
05e7e5e972
Fix flake8 violation
...
Apparently flake8 v3 puts the error on a different line to v2. Easiest way to
make sure that happens is by putting the whole statement on one line :)
2016-07-26 11:59:08 +01:00
Richard van der Hoff
db4f823d34
Fix flake8 configuration
...
Apparently flake8 v3 doesn't like trailing comments on config settings.
Also remove the pep8 config, which didn't work (because it was missing W503)
and duplicated the flake8 config. We don't use pep8 on its own, so the config
was duplicative.
2016-07-26 11:49:40 +01:00
Richard van der Hoff
8e02494166
Delete refresh tokens when deleting devices
2016-07-26 11:10:37 +01:00
Mark Haines
a6f06ce3e2
Fix how push_actions are redacted.
2016-07-26 11:05:39 +01:00
David Baker
d34e9f93b7
Merge pull request #949 from matrix-org/rav/update_devices
...
Implement updates and deletes for devices
2016-07-26 10:49:55 +01:00
Mark Haines
efeb6176c1
Don't add rejected events if we've seen them befrore. Add some comments to explain what the code is doing mechanically
2016-07-26 10:49:52 +01:00
Matthew Hodgson
1a54513cf1
federation doesn't work over ipv6 yet thanks to twisted
2016-07-26 10:09:37 +02:00
Matthew Hodgson
242c52d607
typo
2016-07-26 10:09:25 +02: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
Mark Haines
1b3c3e6d68
Only update the events and event_json tables for rejected events
2016-07-25 18:44:30 +01:00
Richard van der Hoff
33d08e8433
Log when adding listeners
2016-07-25 17:22:15 +01:00
Mark Haines
8f7f4cb92b
Don't add the events to forward extremities if the event is rejected
2016-07-25 17:13:37 +01:00
Mark Haines
2623cec874
Don't add rejections to the state_group, persist all rejections
2016-07-25 16:12:16 +01:00
David Baker
4fcdf7b4b2
Merge pull request #946 from matrix-org/dbkr/log_recaptcha_hostname
...
Log the hostname the reCAPTCHA was completed on
2016-07-25 16:10:39 +01:00
Mark Haines
955ef1f06c
fix: defer.returnValue takes one argument
2016-07-25 16:04:45 +01:00
Richard van der Hoff
2ee4c9ee02
background updates: fix assert again
2016-07-25 16:01:46 +01:00
Richard van der Hoff
9dbd903f41
background updates: Fix assertion to do something
2016-07-25 14:05:23 +01:00
Richard van der Hoff
bf3de7b90b
Merge pull request #945 from matrix-org/rav/background_reindex
...
Create index on user_ips in the background
2016-07-25 14:04:05 +01:00
Richard van der Hoff
e73ad8de3b
Merge pull request #947 from matrix-org/rav/unittest_logging
...
Slightly saner logging for unittests
2016-07-25 13:44:46 +01:00
Richard van der Hoff
42f4feb2b7
PEP8
2016-07-25 12:25:06 +01:00
Richard van der Hoff
f16f0e169d
Slightly saner logging for unittests
...
1. Give the handler used for logging in unit tests a formatter, so that the
output is slightly more meaningful
2. Log some synapse.storage stuff, because it's useful.
2016-07-25 12:12:47 +01:00
Richard van der Hoff
465117d7ca
Fix background_update tests
...
A bit of a cleanup for background_updates, and make sure that the real
background updates have run before we start the unit tests, so that they don't
interfere with the tests.
2016-07-25 12:10:42 +01:00
David Baker
7ed58bb347
Use get to avoid KeyErrors
2016-07-22 17:18:50 +01:00
David Baker
dad2da7e54
Log the hostname the reCAPTCHA was completed on
...
This could be useful information to have in the logs. Also comment about how & why we don't verify the hostname.
2016-07-22 17:00:56 +01:00
Richard van der Hoff
363786845b
PEP8
2016-07-22 13:21:07 +01:00
Richard van der Hoff
ec5717caf5
Create index on user_ips in the background
...
user_ips is kinda big, so really we want to add the index in the background
once we're running. Replace the schema delta with one which will do that.
I've done this in a way that's reasonably easy to reuse as there a few other
indexes I need, and I don't suppose they will be the last.
2016-07-22 13:16:39 +01:00
Erik Johnston
d26b660aa6
Cache getPeer
2016-07-21 17:38:51 +01:00
Erik Johnston
aede7248ab
Split out a FederationReader process
2016-07-21 17:37:44 +01:00
David Baker
68a92afcff
Merge pull request #944 from matrix-org/rav/devices_returns_list
...
make /devices return a list
2016-07-21 17:00:26 +01:00
Richard van der Hoff
55abbe1850
make /devices return a list
...
Turns out I specced this to return a list of devices rather than a dict of them
2016-07-21 15:57:28 +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
1c3c202b96
Fix PEP8 errors
2016-07-21 13:15:15 +01:00
Richard van der Hoff
406f7aa0f6
Implement GET /device/{deviceId}
2016-07-21 12:00:29 +01:00
Richard van der Hoff
34f56b40fd
Merge branch 'rav/get_devices_api' into develop
2016-07-21 11:59:30 +01:00
Richard van der Hoff
c445f5fec7
storage/client_ips: remove some dead code
2016-07-21 11:58:47 +01:00
David Baker
44adde498e
Merge pull request #939 from matrix-org/rav/get_devices_api
...
GET /devices endpoint
2016-07-21 11:54:47 +01:00