Andrew Morgan
4a125be138
Make federation endpoints more tolerant of trailing slashes v2 ( #4935 )
...
Redo of https://github.com/matrix-org/synapse/pull/4840
2019-03-26 11:35:29 +00:00
Richard van der Hoff
9bde730ef8
Fix bug where read-receipts lost their timestamps ( #4927 )
...
Make sure that they are sent correctly over the replication stream.
Fixes : #4898
2019-03-25 16:38:05 +00:00
Richard van der Hoff
a54a44734f
Use an explicit dbname for postgres connections in the tests. ( #4928 )
...
I don't have a database with the same name as my user, so leaving the database
name unset fails.
While we're at it, clear out some unused stuff in the test setup.
2019-03-25 16:36:56 +00:00
Erik Johnston
5fee9d8067
Merge pull request #4869 from matrix-org/erikj/yaml_load
...
Fix yaml warnings by using safe_load
2019-03-22 11:58:13 +00:00
Erik Johnston
3677548a82
Use yaml safe_load
2019-03-22 10:20:17 +00:00
Amber Brown
a68e00fca8
Some more porting to HomeserverTestCase and remove old RESTHelper ( #4913 )
2019-03-22 02:10:21 +11:00
Andrew Morgan
7bef97dfb7
Remove trailing slashes from outbound federation requests and retry on 400 ( #4840 )
...
As per #3622 , we remove trailing slashes from outbound federation requests. However, to ensure that we remain backwards compatible with previous versions of Synapse, if we receive a HTTP 400 with `M_UNRECOGNIZED`, then we are likely talking to an older version of Synapse in which case we retry with a trailing slash appended to the request path.
2019-03-21 15:07:28 +00:00
Erik Johnston
01e6b405be
Merge pull request #4908 from matrix-org/erikj/block_peek_on_blocked_rooms
...
Deny peeking into rooms that have been blocked
2019-03-21 14:07:17 +00:00
Erik Johnston
d3f640f0ac
isort
2019-03-21 11:29:48 +00:00
Erik Johnston
3959858eaa
Merge pull request #4904 from matrix-org/erikj/fix_shutdown
...
Fixup shutdown room API
2019-03-21 11:24:42 +00:00
Erik Johnston
cd80cbffea
Fix typo and add description
2019-03-21 11:24:04 +00:00
Erik Johnston
536a266520
Deny peeking into rooms that have been blocked
2019-03-21 11:20:13 +00:00
Erik Johnston
4a8a1ac962
Rejig testcase to make it more extensible
2019-03-21 11:02:11 +00:00
Erik Johnston
9c9e618b93
Remove debug
2019-03-21 10:58:56 +00:00
Erik Johnston
5c6f61f81c
Add tests
2019-03-21 10:51:21 +00:00
Erik Johnston
09f991a63d
Merge pull request #4896 from matrix-org/erikj/disable_room_directory
...
Add option to disable search room lists
2019-03-21 10:16:54 +00:00
Richard van der Hoff
a6f2d3053d
Log requests which are simulated by the unit tests. ( #4905 )
...
Rather than stubbing out the access_log, make it actually log the requests,
which makes it a lot more obvious what is going on during tests.
2019-03-20 18:00:02 +00:00
Erik Johnston
263f2c9ce1
Merge pull request #4895 from matrix-org/erikj/disable_user_search
...
Add option to disable searching in the user dir
2019-03-20 16:47:15 +00:00
Richard van der Hoff
a902d13180
Batch up outgoing read-receipts to reduce federation traffic. ( #4890 )
...
Rate-limit outgoing read-receipts as per #4730 .
2019-03-20 16:02:25 +00:00
Erik Johnston
3660d24ebe
Add test
2019-03-20 15:16:36 +00:00
Erik Johnston
cc09685830
Add test
2019-03-20 14:53:44 +00:00
Andrew Morgan
bb52a2e653
lint
2019-03-20 14:08:57 +00:00
Andrew Morgan
cd36a1283b
New test, fix issues
2019-03-20 14:00:39 +00:00
Andrew Morgan
c69df5d5d3
Fix comments. v0.99.2 -> v0.99.3
2019-03-20 11:27:18 +00:00
Andrew Morgan
94cb7939e4
Federation test fixed!
2019-03-20 10:50:44 +00:00
Richard van der Hoff
b5d48560c7
Fix RegistrationTestCase
...
turns out this relies on there being a `user_consent_version` set.
2019-03-19 12:05:05 +00:00
Richard van der Hoff
13bc1e0746
Use a regular HomeServerConfig object for unit tests
...
Rather than using a Mock for the homeserver config, use a genuine
HomeServerConfig object. This makes for a more realistic test, and means that
we don't have to keep remembering to add things to the mock config every time
we add a new config setting.
2019-03-19 11:44:43 +00:00
Richard van der Hoff
053c50bcb3
Fix resource limits tests
...
Make sure that we have a `server_notices_mxid` set, given that we are relying
on it.
2019-03-19 11:44:43 +00:00
Richard van der Hoff
45bb54a6c6
Fix registration test
...
* Set allow_guest_access = True, since we rely on it
* config doesn't have a `hostname` attribute; it is `server_name`
2019-03-19 11:44:43 +00:00
Richard van der Hoff
8c1774e821
Fix email test
...
The Mailer expects the config object to have `email_smtp_pass` and
`email_riot_base_url` attributes (and it won't by default, because the default
config impl doesn't set any of the attributes unless email_enable_notifs is
set).
2019-03-19 11:44:43 +00:00
Richard van der Hoff
45c4e19c74
Merge remote-tracking branch 'origin/develop' into HEAD
2019-03-19 11:43:46 +00:00
Neil Johnson
88f0675967
fix test_auto_create_auto_join_where_no_consent ( #4886 )
2019-03-19 11:38:59 +00:00
Richard van der Hoff
0dbfae03f9
Enforce hs_disabled_message correctly
...
Fixes a bug where hs_disabled_message was not enforced for 3pid-based requests
if there was no server_notices_mxid configured.
2019-03-19 11:30:54 +00:00
Amber Brown
282c97327f
Migrate the user directory initial population to a background task ( #4864 )
2019-03-19 04:50:24 +11:00
Andrew Morgan
621e7f37f1
Better exception handling
2019-03-18 17:45:54 +00:00
Brendan Abolivier
651ad8bc96
Add ratelimiting on failed login attempts ( #4865 )
2019-03-18 12:57:20 +00:00
Brendan Abolivier
899e523d6d
Add ratelimiting on login ( #4821 )
...
Add two ratelimiters on login (per-IP address and per-userID).
2019-03-15 17:46:16 +00:00
Erik Johnston
271cb1998b
Revert "Make federation endpoints more tolerant of trailing slashes for some endpoints ( #4793 )"
...
This reverts commit 290552fd83
.
2019-03-14 14:30:54 +00:00
Erik Johnston
9073cfc8bd
Merge pull request #4846 from matrix-org/hawkowl/userdir-search
...
Improve searching in the userdir
2019-03-14 13:54:15 +00:00
Andrew Morgan
ecea5af491
Correct var name
2019-03-13 21:21:03 +00:00
Andrew Morgan
86c60bda15
i should have given up x3
2019-03-13 20:19:07 +00:00
Andrew Morgan
45524f2f5e
i should have given up x2
2019-03-13 20:17:39 +00:00
Andrew Morgan
09626bfd39
Switch to wrapper function around _send_request
2019-03-13 18:26:06 +00:00
Andrew Morgan
97653ef1f4
Correct argument name
2019-03-12 14:30:26 +00:00
Amber Brown
797b6a63fc
fixup
2019-03-13 01:17:51 +11:00
Andrew Morgan
0ea8582f8b
Cleaner way of implementing trailing slashes
2019-03-12 14:11:11 +00:00
Amber Brown
d306bd1b26
fixup
2019-03-12 22:38:01 +11:00
Amber Brown
10480c4348
fixup
2019-03-12 21:47:14 +11:00
Andrew Morgan
4868b12029
and again
2019-03-11 18:22:26 +00:00
Andrew Morgan
802cb5dcf0
Fix syntax error
2019-03-11 18:08:28 +00:00