summary refs log tree commit diff
path: root/tests (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #5001 from matrix-org/rav/keyring_cleanupsRichard van der Hoff2019-04-081-0/+130
|\ | | | | Cleanups in the Keyring
| * test for get_keys_from_perspectivesRichard van der Hoff2019-04-041-0/+67
| |
| * add a test for get_keys_from_serverRichard van der Hoff2019-04-041-0/+63
| |
* | Add config option to block users from looking up 3PIDs (#5010)Brendan Abolivier2019-04-042-1/+66
| |
* | Add unit test for deleting groupsErik Johnston2019-04-031-0/+124
| |
* | Fix grammar and document get_current_users_in_room (#4998)Andrew Morgan2019-04-031-2/+2
|/
* Rewrite KeyringTestCase as a HomeServerTestCase (#4986)Richard van der Hoff2019-04-031-107/+104
| | | | | This is a bit fiddly due to the keyring doing weird things with logcontexts.
* Remove presence lists (#4989)Neil Johnson2019-04-031-118/+0
| | | Remove presence list support as per MSC 1819
* Fix sync bug when accepting invites (#4956)Richard van der Hoff2019-04-023-49/+196
| | | | | | | | | | Hopefully this time we really will fix #4422. We need to make sure that the cache on `get_rooms_for_user_with_stream_ordering` is invalidated *before* the SyncHandler is notified for the new events, and we can now do so reliably via the `events` stream.
* Neilj/fix threepid auth check (with tests) (#4474)Neil Johnson2019-04-011-0/+32
| | | test threepid checking
* Collect room-version variations into one place (#4969)Richard van der Hoff2019-04-019-26/+32
| | | | Collect all the things that make room-versions different to one another into one place, so that it's easier to define new room versions.
* Merge pull request #4942 from matrix-org/erikj/fix_presenceErik Johnston2019-03-281-1/+175
|\ | | | | Use event streams to calculate presence
| * Review commentsErik Johnston2019-03-281-5/+9
| |
| * Add unit testsErik Johnston2019-03-271-1/+171
| |
* | Move replication.tcp.streams into a packageRichard van der Hoff2019-03-271-1/+1
|/
* Make federation endpoints more tolerant of trailing slashes v2 (#4935)Andrew Morgan2019-03-261-3/+3
| | | Redo of https://github.com/matrix-org/synapse/pull/4840
* Fix bug where read-receipts lost their timestamps (#4927)Richard van der Hoff2019-03-254-0/+148
| | | | | Make sure that they are sent correctly over the replication stream. Fixes: #4898
* Use an explicit dbname for postgres connections in the tests. (#4928)Richard van der Hoff2019-03-251-18/+16
| | | | | | 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.
* Merge pull request #4869 from matrix-org/erikj/yaml_loadErik Johnston2019-03-222-3/+3
|\ | | | | Fix yaml warnings by using safe_load
| * Use yaml safe_loadErik Johnston2019-03-222-3/+3
| |
* | Some more porting to HomeserverTestCase and remove old RESTHelper (#4913)Amber Brown2019-03-224-230/+123
| |
* | Remove trailing slashes from outbound federation requests and retry on 400 ↵Andrew Morgan2019-03-212-0/+101
|\ \ | |/ |/| | | | | (#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.
| * lintAndrew Morgan2019-03-201-1/+1
| |
| * New test, fix issuesAndrew Morgan2019-03-201-0/+45
| |
| * Fix comments. v0.99.2 -> v0.99.3Andrew Morgan2019-03-201-1/+1
| |
| * Federation test fixed!Andrew Morgan2019-03-201-2/+5
| |
| * Better exception handlingAndrew Morgan2019-03-181-4/+1
| |
| * Correct var nameAndrew Morgan2019-03-131-0/+54
| |
| * i should have given up x3Andrew Morgan2019-03-131-39/+0
| |
| * i should have given up x2Andrew Morgan2019-03-131-0/+39
| |
| * Switch to wrapper function around _send_requestAndrew Morgan2019-03-131-2/+2
| |
| * Correct argument nameAndrew Morgan2019-03-121-2/+2
| |
| * Cleaner way of implementing trailing slashesAndrew Morgan2019-03-121-2/+4
| |
| * and againAndrew Morgan2019-03-111-1/+1
| |
| * Fix syntax errorAndrew Morgan2019-03-111-1/+1
| |
| * We're calling different functions nowAndrew Morgan2019-03-111-2/+2
| |
* | Merge pull request #4908 from matrix-org/erikj/block_peek_on_blocked_roomsErik Johnston2019-03-211-1/+65
|\ \ | | | | | | Deny peeking into rooms that have been blocked
| * | isortErik Johnston2019-03-211-1/+1
| | |
| * | Deny peeking into rooms that have been blockedErik Johnston2019-03-211-1/+65
| | |
* | | Merge pull request #4904 from matrix-org/erikj/fix_shutdownErik Johnston2019-03-211-1/+74
|\ \ \ | | | | | | | | Fixup shutdown room API
| * | | Fix typo and add descriptionErik Johnston2019-03-211-1/+5
| |/ /
| * | Rejig testcase to make it more extensibleErik Johnston2019-03-211-17/+22
| | |
| * | Remove debugErik Johnston2019-03-211-1/+0
| | |
| * | Add testsErik Johnston2019-03-211-1/+66
| | |
* | | Merge pull request #4896 from matrix-org/erikj/disable_room_directoryErik Johnston2019-03-212-3/+58
|\ \ \ | | | | | | | | Add option to disable search room lists
| * | | Add testErik Johnston2019-03-202-3/+58
| | | |
* | | | Log requests which are simulated by the unit tests. (#4905)Richard van der Hoff2019-03-201-8/+1
| | | | | | | | | | | | | | | | 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.
* | | | Merge pull request #4895 from matrix-org/erikj/disable_user_searchErik Johnston2019-03-201-0/+52
|\ \ \ \ | |_|/ / |/| | | Add option to disable searching in the user dir
| * | | Add testErik Johnston2019-03-201-0/+52
| |/ /
* / / Batch up outgoing read-receipts to reduce federation traffic. (#4890)Richard van der Hoff2019-03-201-0/+128
|/ / | | | | | | Rate-limit outgoing read-receipts as per #4730.
* | Fix RegistrationTestCaseRichard van der Hoff2019-03-191-2/+9
| | | | | | | | turns out this relies on there being a `user_consent_version` set.
* | Use a regular HomeServerConfig object for unit testsRichard van der Hoff2019-03-191-11/+15
| | | | | | | | | | | | | | 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.
* | Fix resource limits testsRichard van der Hoff2019-03-191-2/+5
| | | | | | | | | | Make sure that we have a `server_notices_mxid` set, given that we are relying on it.
* | Fix registration testRichard van der Hoff2019-03-191-1/+2
| | | | | | | | | | * Set allow_guest_access = True, since we rely on it * config doesn't have a `hostname` attribute; it is `server_name`
* | Fix email testRichard van der Hoff2019-03-191-0/+2
| | | | | | | | | | | | | | 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).
* | Merge remote-tracking branch 'origin/develop' into HEADRichard van der Hoff2019-03-191-2/+22
|\ \
| * | fix test_auto_create_auto_join_where_no_consent (#4886)Neil Johnson2019-03-191-2/+22
| | |
* | | Enforce hs_disabled_message correctlyRichard van der Hoff2019-03-191-0/+17
|/ / | | | | | | | | Fixes a bug where hs_disabled_message was not enforced for 3pid-based requests if there was no server_notices_mxid configured.
* | Migrate the user directory initial population to a background task (#4864)Amber Brown2019-03-193-45/+79
| |
* | Add ratelimiting on failed login attempts (#4865)Brendan Abolivier2019-03-182-0/+47
| |
* | Add ratelimiting on login (#4821)Brendan Abolivier2019-03-153-4/+128
| | | | | | Add two ratelimiters on login (per-IP address and per-userID).
* | Revert "Make federation endpoints more tolerant of trailing slashes for some ↵Erik Johnston2019-03-141-3/+3
| | | | | | | | | | | | endpoints (#4793)" This reverts commit 290552fd836f4ae2dc1d893a7f72f7fff85365d3.
* | Merge pull request #4846 from matrix-org/hawkowl/userdir-searchErik Johnston2019-03-143-15/+22
|\ \ | |/ |/| Improve searching in the userdir
| * fixupAmber Brown2019-03-131-20/+1
| |
| * fixupAmber Brown2019-03-121-2/+2
| |
| * fixupAmber Brown2019-03-121-16/+20
| |
| * fixesAmber Brown2019-03-121-4/+12
| |
| * setup masterAmber Brown2019-03-111-0/+2
| |
| * Merge remote-tracking branch 'origin/develop' into hawkowl/userdir-searchAmber Brown2019-03-111-0/+1
| |\
| * | initialAmber Brown2019-03-111-0/+12
| | |
* | | Make federation endpoints more tolerant of trailing slashes for some ↵Andrew Morgan2019-03-111-3/+3
| |/ |/| | | | | | | endpoints (#4793) Server side of a solution towards #3622.
* | Disable captcha registration by default in testsAndrew Morgan2019-03-081-0/+1
|/
* Rewrite userdir to be faster (#4537)Amber Brown2019-03-072-43/+225
|
* Merge pull request #4772 from jbweston/jbweston/server-version-apiErik Johnston2019-03-051-2/+36
|\ | | | | Add 'server_version' endpoint to admin API
| * Add 'server_version' endpoint to admin APIJoseph Weston2019-03-011-1/+35
| | | | | | | | | | This is required because the 'Server' HTTP header is not always passed through proxies.
| * Import 'admin' module rather than 'register_servlets' directlyJoseph Weston2019-03-011-2/+2
| | | | | | | | | | | | We will later need also to import 'register_servlets' from the 'login' module, so we un-pollute the namespace now to keep the logical changes separate.
* | Add rate-limiting on registration (#4735)Brendan Abolivier2019-03-059-23/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Rate-limiting for registration * Add unit test for registration rate limiting * Add config parameters for rate limiting on auth endpoints * Doc * Fix doc of rate limiting function Co-Authored-By: babolivier <contact@brendanabolivier.com> * Incorporate review * Fix config parsing * Fix linting errors * Set default config for auth rate limiting * Fix tests * Add changelog * Advance reactor instead of mocked clock * Move parameters to registration specific config and give them more sensible default values * Remove unused config options * Don't mock the rate limiter un MAU tests * Rename _register_with_store into register_with_store * Make CI happy * Remove unused import * Update sample config * Fix ratelimiting test for py2 * Add non-guest test
* | Update test_typing to use HomeserverTestCase. (#4771)Richard van der Hoff2019-03-044-179/+175
|/
* Fix parsing of Content-Disposition headers (#4763)Richard van der Hoff2019-02-271-0/+45
| | | | | | | | | | | * Fix parsing of Content-Disposition headers TIL: filenames in content-dispostion headers can contain semicolons, and aren't %-encoded. * fix python2 incompatibility * Fix docstrings
* Move from TravisCI to BuildKite (#4752)Amber Brown2019-02-271-10/+34
|
* Fix unit testsErik Johnston2019-02-271-0/+6
|
* UPSERT many functionality (#4644)Amber Brown2019-02-201-0/+88
|
* Fix registration on workers (#4682)Erik Johnston2019-02-201-1/+1
| | | | | | | | | | * Move RegistrationHandler init to HomeServer * Move post registration actions to RegistrationHandler * Add post regisration replication endpoint * Newsfile
* Move register_device into handlerErik Johnston2019-02-181-70/+23
|
* Fix unit testsErik Johnston2019-02-181-6/+15
|
* Clarify and fix behaviour when there are multiple aliasesErik Johnston2019-02-141-0/+6
|
* Add configurable room list publishing rulesErik Johnston2019-02-142-0/+74
| | | | | This allows specifying who and what is allowed to be published onto the public room list
* Fix error when loading cert if tls is disabled (#4618)Richard van der Hoff2019-02-121-1/+1
| | | | | | If TLS is disabled, it should not be an error if no cert is given. Fixes #4554.
* fix testsRichard van der Hoff2019-02-111-2/+6
|
* Move ClientTLSOptionsFactory init out of refresh_certificates (#4611)Richard van der Hoff2019-02-111-3/+1
| | | | | It's nothing to do with refreshing the certificates. No idea why it was here.
* Merge pull request #4580 from matrix-org/uhoreg/e2e_backup_add_updatingErik Johnston2019-02-111-0/+72
|\ | | | | add updating of backup versions
| * make sure version is in body and wrap in linearizer queueHubert Chathi2019-02-081-0/+72
| | | | | | | | also add tests
* | Merge pull request #4420 from matrix-org/jaywink/openid-listenerErik Johnston2019-02-112-1/+120
|\ \ | |/ |/| New listener resource for the federation API "openid/userinfo" endpoint
| * Fix flake8 issuesJason Robinson2019-01-231-2/+8
| | | | | | | | Signed-off-by: Jason Robinson <jasonr@matrix.org>
| * Fix openid tests after rebaseJason Robinson2019-01-231-2/+2
| | | | | | | | Signed-off-by: Jason Robinson <jasonr@matrix.org>
| * Fix sorting of imports in tests. Remove an unnecessary mockJason Robinson2019-01-231-2/+2
| | | | | | | | Signed-off-by: Jason Robinson <jasonr@matrix.org>
| * Add tests for the openid lister for SynapseHomeServerJason Robinson2019-01-231-1/+48
| | | | | | | | | | | | | | Check all possible variants of openid and federation listener on/off possibilities. Signed-off-by: Jason Robinson <jasonr@matrix.org>
| * Add tests for the openid lister for FederationReaderServerJason Robinson2019-01-231-0/+66
| | | | | | | | | | | | | | Check all possible variants of openid and federation listener on/off possibilities. Signed-off-by: Jason Robinson <jasonr@matrix.org>
| * Fix a test docstring in frontend proxy testsJason Robinson2019-01-231-1/+1
| | | | | | | | Signed-off-by: Jason Robinson <jasonr@matrix.org>
* | Treat an invalid .well-known the same as an absent oneRichard van der Hoff2019-02-011-11/+70
| | | | | | | | ... basically, carry on and fall back to SRV etc.
* | Update federation routing logic to check .well-known before SRVRichard van der Hoff2019-01-311-30/+21
| |
* | Merge pull request #4472 from matrix-org/neilj/room_capabilitiesErik Johnston2019-01-301-0/+78
|\ \ | | | | | | Server capabilities support
| * \ Merge branch 'develop' into neilj/room_capabilitiesNeil Johnson2019-01-3020-120/+766
| |\ \
| * | | rework format of change password capabilityNeil Johnson2019-01-291-2/+2
| | | |
| * | | support change_password in capabilities end-pointNeil Johnson2019-01-291-0/+23
| | | |
| * | | isortNeil Johnson2019-01-291-1/+2
| | | |
| * | | enforce auth for capabilities endpointNeil Johnson2019-01-291-4/+19
| | | |
| * | | Support room version capabilities in CS API (MSC1804)Neil Johnson2019-01-251-0/+39
| | | |
* | | | Follow redirects on .well-known (#4520)Richard van der Hoff2019-01-301-0/+97
| | | |
* | | | Add a caching layer to .well-known responses (#4516)Richard van der Hoff2019-01-303-8/+243
| | | |
* | | | Fix flake8 (#4519)Amber Brown2019-01-304-10/+1
| |/ / |/| |
* | | Relax requirement for a content-type on .well-known (#4511)Richard van der Hoff2019-01-291-1/+0
| | |
* | | Do not generate self-signed TLS certificates by default. (#4509)Amber Brown2019-01-292-2/+75
| | |
* | | Merge pull request #4481 from matrix-org/erikj/event_builderErik Johnston2019-01-292-31/+27
|\ \ \ | | | | | | | | Refactor event building into EventBuilder
| * | | Fix test to use valid event formatErik Johnston2019-01-291-1/+1
| | | |
| * | | Make add_hashes_and_signatures operate on dictsErik Johnston2019-01-291-30/+26
| | | |
* | | | Implement MSC1708 (.well-known lookups for server routing) (#4489)Richard van der Hoff2019-01-294-9/+350
| | | |
* | | | Enable configuring test log level via env var (#4506)Richard van der Hoff2019-01-293-30/+79
|/ / / | | | | | | | | | I got fed up with always adding '@unittest.DEBUG' every time I needed to debug a test.
* | | Use SimpleResolverComplexifier in tests (#4497)Richard van der Hoff2019-01-292-32/+16
| | | | | | | | | | | | | | | two reasons for this. One, it saves a bunch of boilerplate. Two, it squashes unicode to IDNA-in-a-`str` (even on python 3) in a way that it turns out we rely on to give consistent behaviour between python 2 and 3.
* | | Merge pull request #4482 from matrix-org/erikj/event_auth_room_versionErik Johnston2019-01-282-3/+14
|\ \ \ | | | | | | | | Pass through room version to event auth
| * | | Pass through room version to event authErik Johnston2019-01-252-3/+14
| | | |
* | | | Fix UPSERTs on SQLite 3.24+ (#4477)Amber Brown2019-01-282-4/+7
| | | |
* | | | Handle IP literals explicitlyRichard van der Hoff2019-01-281-17/+2
| | | | | | | | | | | | | | | | We don't want to be doing .well-known lookups on these guys.
* | | | Fix idna and ipv6 literal handling in MatrixFederationAgent (#4487)Richard van der Hoff2019-01-281-1/+180
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Turns out that the library does a better job of parsing URIs than our reinvented wheel. Who knew. There are two things going on here. The first is that, unlike parse_server_name, URI.fromBytes will strip off square brackets from IPv6 literals, which means that it is valid input to ClientTLSOptionsFactory and HostnameEndpoint. The second is that we stay in `bytes` throughout (except for the argument to ClientTLSOptionsFactory), which avoids the weirdness of (sometimes) ending up with idna-encoded values being held in `unicode` variables. TBH it probably would have been ok but it made the tests fragile.
* | | Merge pull request #4470 from matrix-org/erikj/require_format_versionErik Johnston2019-01-255-4/+14
|\ \ \ | | | | | | | | Require event format version to parse or create events
| * | | Fix testsErik Johnston2019-01-255-4/+14
| | | |
* | | | Fix Host header sent by MatrixFederationAgent (#4468)Richard van der Hoff2019-01-252-1/+17
|/ / / | | | | | | | | | | | | | | | Move the Host header logic down here so that (a) it is used if we reuse the agent elsewhere, and (b) we can mess about with it with .well-known.
* | | Revert "Require event format version to parse or create events"Erik Johnston2019-01-255-14/+4
| | |
* | | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2019-01-245-14/+163
|\| | | | | | | | | | | erikj/require_format_version
| * | Look up the right SRV recordRichard van der Hoff2019-01-241-3/+9
| | |
| * | lots more tests for MatrixFederationAgentRichard van der Hoff2019-01-241-10/+79
| | |
| * | Merge pull request #4435 from matrix-org/neilj/fix_threepid_auth_checkNeil Johnson2019-01-241-1/+3
| |\ \ | | | | | | | | Neilj/fix threepid auth check
| | * | Fix None guard in config.server.is_threepid_reservedNeil Johnson2019-01-221-1/+3
| | |/
| * | Use native UPSERTs where possible (#4306)Amber Brown2019-01-243-5/+20
| | |
| * | Don't send IP addresses as SNI (#4452)Richard van der Hoff2019-01-241-3/+60
| | | | | | | | | | | | | | | | | | The problem here is that we have cut-and-pasted an impl from Twisted, and then failed to maintain it. It was fixed in Twisted in https://github.com/twisted/twisted/pull/1047/files; let's do the same here.
* | | Fix testsErik Johnston2019-01-245-4/+14
|/ /
* | fix python2 test failureRichard van der Hoff2019-01-231-1/+1
| |
* | Add a test for MatrixFederationAgentRichard van der Hoff2019-01-222-1/+195
| |
* | put resolve_service in an objectRichard van der Hoff2019-01-221-20/+18
| | | | | | | | this makes it easier to stub things out for tests.
* | Require that service_name be a byte stringRichard van der Hoff2019-01-221-4/+4
| | | | | | | | it is only ever a bytes now, so let's enforce that.
* | Make MatrixFederationClient use MatrixFederationAgentRichard van der Hoff2019-01-221-0/+96
|/ | | | ... instead of the matrix_federation_endpoint
* Refactor and bugfix for resove_service (#4427)Richard van der Hoff2019-01-222-14/+108
|
* Require ECDH key exchange & remove dh_params (#4429)Amber Brown2019-01-221-1/+0
| | | * remove dh_params and set better cipher string
* Remove redundant WrappedConnection (#4409)Richard van der Hoff2019-01-181-7/+47
| | | | | | | | * Remove redundant WrappedConnection The matrix federation client uses an HTTP connection pool, which times out its idle HTTP connections, so there is no need for any of this business.
* Fix incorrect logcontexts after a Deferred was cancelled (#4407)Richard van der Hoff2019-01-171-0/+104
|
* Merge remote-tracking branch 'origin/master' into developAmber Brown2019-01-111-154/+1
|\
| * Merge branch rav/macaroon_key_fix_0.34 into rav/macaroon_key_fix_0.34.1Richard van der Hoff2019-01-101-154/+1
| |\ | | | | | | | | | Fixes #4371
| | * Merge branch 'rav/macaroon_key_fix' into rav/macaroon_key_fix_0.34Richard van der Hoff2019-01-101-154/+1
| | |\
| | | * Skip macaroon check for access tokens in the dbRichard van der Hoff2019-01-101-148/+1
| | | |
* | | | Fix adding new rows instead of updating them if one of the key values is a ↵Amber Brown2019-01-091-0/+71
|/ / / | | | | | | | | | NULL in upserts. (#4369)
* | | Refactor request sending to have better excpetions (#4358)Erik Johnston2019-01-081-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Correctly retry and back off if we get a HTTPerror response * Refactor request sending to have better excpetions MatrixFederationHttpClient blindly reraised exceptions to the caller without differentiating "expected" failures (e.g. connection timeouts etc) versus more severe problems (e.g. programming errors). This commit adds a RequestSendFailed exception that is raised when "expected" failures happen, allowing the TransactionQueue to log them as warnings while allowing us to log other exceptions as actual exceptions.
* | | Remove v1 only REST APIs now we don't ship matrix console (#4334)Amber Brown2018-12-292-145/+44
| | |
* | | Return well_known in /login response (#4319)Richard van der Hoff2018-12-241-0/+3
| | | | | | | | | | | | ... as per MSC1730.
* | | Merge pull request #4317 from de-vri-es/test-metric-prometheus-0.5Richard van der Hoff2018-12-231-1/+23
|\ \ \ | | | | | | | | Fix test_metrics.py compatibility prometheus_client 0.5
| * | | Fix test_metrics.py compatibility prometheus_client 0.5Maarten de Vries2018-12-211-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | prometheus_client 0.5 has a named-tuple Sample type with more member than the old plain tuple had. This commit makes sure the unit test detects this and changes the way it reads the sample. Signed-off-by: Maarten de Vries <maarten@de-vri.es>
* | | | Fix IP URL previews on Python 3 (#4215)Amber Brown2018-12-222-98/+334
|/ / /
* | | create support user (#4141)Neil Johnson2018-12-148-10/+204
| | | | | | | | | | | | | | | | | | Allow for the creation of a support user. A support user can access the server, join rooms, interact with other users, but does not appear in the user directory nor does it contribute to monthly active user limits.
* | | Initialise user displayname from SAML2 data (#4272)Richard van der Hoff2018-12-071-1/+1
| | | | | | | | | | | | | | | When we register a new user from SAML2 data, initialise their displayname correctly.
* | | Implement SAML2 authentication (#4267)Richard van der Hoff2018-12-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements both a SAML2 metadata endpoint (at `/_matrix/saml2/metadata.xml`), and a SAML2 response receiver (at `/_matrix/saml2/authn_response`). If the SAML2 response matches what's been configured, we complete the SSO login flow by redirecting to the client url (aka `RelayState` in SAML2 jargon) with a login token. What we don't yet have is anything to build a SAML2 request and redirect the user to the identity provider. That is left as an exercise for the reader.
* | | Factor SSO success handling out of CAS login (#4264)Richard van der Hoff2018-12-071-1/+30
| | | | | | | | | | | | This is mostly factoring out the post-CAS-login code to somewhere we can reuse it for other SSO flows, but it also fixes the userid mapping while we're at it.
* | | Rip out half-implemented m.login.saml2 support (#4265)Richard van der Hoff2018-12-061-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Rip out half-implemented m.login.saml2 support This was implemented in an odd way that left most of the work to the client, in a way that I really didn't understand. It's going to be a pain to maintain, so let's start by ripping it out. * drop undocumented dependency on dateutil It turns out we were relying on dateutil being pulled in transitively by pysaml2. There's no need for that bloat.
* | | Implement .well-known handling (#4262)Richard van der Hoff2018-12-051-0/+58
|/ / | | | | | | Sometimes it's useful for synapse to generate its own .well-known file.
* | Patch defer.inlineCallbacks to check logcontexts in tests (#4205)Richard van der Hoff2018-12-043-3/+98
| |
* | Neilj/fix autojoin (#4223)Neil Johnson2018-11-281-1/+11
| | | | | | | | | | | | * Fix auto join failures for servers that require user consent * Fix auto join failures for servers that require user consent
* | Check logcontexts before and after each test (#4190)Richard van der Hoff2018-11-272-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | * Add better diagnostics to flakey keyring test * fix interpolation fail * Check logcontexts before and after each test * update changelog * update changelog
* | Fix more logcontext leaks in tests (#4209)Richard van der Hoff2018-11-271-1/+2
| |
* | Do a GC after each test to fix logcontext leaks (#4227)Richard van der Hoff2018-11-271-2/+13
| | | | | | | | | | | | | | | | | | | | * Some words about garbage collections and logcontexts * Do a GC after each test to fix logcontext leaks This feels like an awful hack, but... * changelog
* | Merge pull request #4204 from matrix-org/rav/logcontext_leak_fixesRichard van der Hoff2018-11-204-5/+8
|\ \ | | | | | | Fix some logcontext leaks
| * | Fix logcontext leak in test_url_previewRichard van der Hoff2018-11-191-1/+2
| | |
| * | Fix logcontext leak in http pusher testRichard van der Hoff2018-11-191-1/+2
| | |
| * | Fix some tests which leaked logcontextsRichard van der Hoff2018-11-192-3/+4
| | |
* | | Fix fallback auth on Python 3 (#4197)Amber Brown2018-11-191-0/+104
|/ /
* | Fix the terms UI auth testsTravis Ralston2018-11-151-1/+1
| | | | | | By setting the config value directly, we skip the block that adds the slash automatically for us.
* | Fix Content-Disposition in media repository (#4176)Amber Brown2018-11-152-0/+160
| |
* | Add option to track MAU stats (but not limit people) (#3830)Travis Ralston2018-11-153-0/+44
| |
* | Use <meta> tags to discover the per-page encoding of html previews (#4183)Amber Brown2018-11-151-0/+77
| |
* | Add a test for the public T&Cs formRichard van der Hoff2018-11-141-0/+7
| |
* | Add test to assert set_e2e_device_keys correctly returns False on no-opErik Johnston2018-11-081-0/+15
| |
* | Fix URL preview bugs (type error when loading cache from db, content-type ↵Amber Brown2018-11-082-0/+166
| | | | | | | | including quotes) (#4157)
* | Remove some boilerplate in tests (#4156)Amber Brown2018-11-0710-216/+161
| |
* | Add config variables for enabling terms auth and the policy name (#4142)Travis Ralston2018-11-062-2/+5
| | | | | | | | So people can still collect consent the old way if they want to.
* | handle empty backups according to latest spec proposal (#4123)Hubert Chathi2018-11-051-42/+37
| | | | | | fixes #4056
* | Tests for user consent resource (#4140)Amber Brown2018-11-063-5/+138
| |
* | Add some tests for the HTTP pusher (#4149)Amber Brown2018-11-061-0/+159
| |
* | Add helpers for getting prev and auth events (#4139)Erik Johnston2018-11-061-1/+1
| | | | | | | | | | | | | | * Add helpers for getting prev and auth events This is in preparation for allowing the event format to change between room versions.
* | Merge pull request #4137 from matrix-org/erikj/clean_up_eventsErik Johnston2018-11-022-3/+3
|\ \ | | | | | | Clean up event accesses and tests
| * | Clean up event accesses and testsErik Johnston2018-11-022-3/+3
| | | | | | | | | | | | | | | This is in preparation to refactor FrozenEvent to support different event formats for different room versions
* | | Fix typing being reset causing infinite syncs (#4127)Amber Brown2018-11-032-1/+130
| | |
* | | Merge pull request #4135 from matrix-org/erikj/fix_state_res_noneErik Johnston2018-11-021-2/+98
|\ \ \ | | | | | | | | Fix None exception in state res v2
| * | | Fix None exception in state res v2Erik Johnston2018-11-021-2/+98
| |/ /
* | | The tests also need a version parameter Travis Ralston2018-10-311-1/+1
| | |
* | | Merge branch 'develop' into travis/login-termsTravis Ralston2018-10-3115-99/+716
|\| |
| * | Fix search 500ing (#4122)Amber Brown2018-10-311-1/+105
| | |
| * | Write some tests for the email pusher (#4095)Amber Brown2018-10-305-3/+160
| | |
| * | Merge pull request #4091 from matrix-org/rav/room_version_upgradesRichard van der Hoff2018-10-291-9/+1
| |\ \ | | | | | | | | Room version upgrade support
| | * | fix broken testRichard van der Hoff2018-10-251-9/+1
| | | | | | | | | | | | | | | | This test stubbed out some stuff in a very weird way. I have no idea why. It broke.
| * | | Port register_new_matrix_user to Python 3 and add tests (#4085)Amber Brown2018-10-262-0/+160
| |/ /
| * | Refactor state group lookup to reduce DB hits (#4011)Erik Johnston2018-10-251-65/+110
| | | | | | | | | | | | | | | | | | | | | | | | Currently when fetching state groups from the data store we make two hits two the database: once for members and once for non-members (unless request is filtered to one or the other). This adds needless load to the datbase, so this PR refactors the lookup to make only a single database hit.
| * | Merge pull request #4051 from matrix-org/erikj/alias_disallow_listErik Johnston2018-10-252-0/+115
| |\ \ | | | | | | | | Add config option to control alias creation
| | * \ Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2018-10-257-23/+734
| | |\ \ | | | | | | | | | | | | | | | erikj/alias_disallow_list
| | * | | Use allow/denyErik Johnston2018-10-252-5/+5
| | | | |
| | * | | Add tests for alias creation rulesErik Johnston2018-10-191-0/+48
| | | | |
| | * | | Add tests for config generationErik Johnston2018-10-191-0/+67
| | | | |
| * | | | Merge pull request #4081 from matrix-org/neilj/fix_mau_initNeil Johnson2018-10-251-2/+8
| |\ \ \ \ | | |_|/ / | |/| | | fix race condiftion in calling initialise_reserved_users
| | * | | fix style inconsistenciesNeil Johnson2018-10-241-2/+2
| | | | |
| | * | | Merge branch 'develop' of github.com:matrix-org/synapse into neilj/fix_mau_initNeil Johnson2018-10-245-4/+677
| | |\ \ \
| | * | | | fix race condiftion in calling initialise_reserved_usersNeil Johnson2018-10-231-2/+8
| | | |/ / | | |/| |
| * | | | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Neil Johnson2018-10-257-4/+1113
| |\ \ \ \ | | | |/ / | | |/| | | | | | | matthew/autocreate_autojoin
| * | | | improve auto room join logic, comments and testsNeil Johnson2018-10-121-4/+17
| | | | |
| * | | | Merge branch 'develop' into matthew/autocreate_autojoinNeil Johnson2018-10-047-205/+292
| |\ \ \ \
| * | | | | move logic into register, fix room alias localpart bug, testsNeil Johnson2018-10-042-19/+44
| | | | | |
* | | | | | pep8Travis Ralston2018-10-242-6/+3
| | | | | |
* | | | | | It helps to import thingsTravis Ralston2018-10-241-0/+16
| | | | | |
* | | | | | Move test to where the other integration tests areTravis Ralston2018-10-242-97/+109
| | | | | |
* | | | | | Fix testTravis Ralston2018-10-241-25/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Debug tests Try printing the channel fix Import and use six Remove debugging Disable captcha Add some mocks Define the URL Fix the clock? Less rendering? use the other render Complete the dummy auth stage Fix last stage of the test Remove mocks we don't need
* | | | | | Merge branch 'develop' into travis/login-termsTravis Ralston2018-10-245-4/+677
|\ \ \ \ \ \ | | |_|/ / / | |/| | | |
| * | | | | Merge remote-tracking branch 'origin/develop' into ↵Richard van der Hoff2018-10-244-3/+666
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | rav/fix_event_filter_validation
| | * \ \ \ \ Merge pull request #4082 from matrix-org/rav/fix_pep8Richard van der Hoff2018-10-242-3/+3
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | Fix a number of flake8 errors
| | | * | | | | Fix a number of flake8 errorsRichard van der Hoff2018-10-242-3/+3
| | | | |_|/ / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Broadly three things here: * disable W504 which seems a bit whacko * remove a bunch of `as e` expressions from exception handlers that don't use them * use `r""` for strings which include backslashes Also, we don't use pep8 any more, so we can get rid of the duplicate config there.
| | * | | | | Merge pull request #4040 from matrix-org/erikj/states_res_v2_rebaseErik Johnston2018-10-242-0/+663
| | |\ \ \ \ \ | | | |/ / / / | | |/| | | | Add v2 state resolution algorithm
| | | * | | | isortErik Johnston2018-10-241-4/+1
| | | | | | |
| | | * | | | Rename resolve_events_with_factoryErik Johnston2018-10-241-2/+2
| | | | | | |
| | | * | | | Add some state res v2 testsErik Johnston2018-10-162-0/+666
| | | | | | |
| * | | | | | Allow backslashes in event field filtersRichard van der Hoff2018-10-241-1/+11
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a bug introduced in https://github.com/matrix-org/synapse/pull/1783 which meant that single backslashes were not allowed in event field filters. The intention here is to allow single-backslashes, but disallow double-backslashes.
* | | | | | Fix terms UI auth testTravis Ralston2018-10-181-2/+5
| | | | | |
* | | | | | Test for terms UI authTravis Ralston2018-10-181-0/+70
|/ / / / /
* / / / / Fix roomlist since tokens on Python 3 (#4046)Will Hunt2018-10-171-0/+39
|/ / / / | | | | | | | | Thanks @Half-Shot !!!
* | | | Merge remote-tracking branch 'origin/develop' into dbkr/e2e_backupsDavid Baker2018-10-0938-985/+1879
|\ \ \ \ | | |/ / | |/| |
| * | | Add testsErik Johnston2018-10-021-0/+45
| | | |
| * | | Disable frozen dicts by default (#3987)Amber Brown2018-10-022-2/+7
| | | |
| * | | Merge pull request #3968 from matrix-org/rav/fix_federation_errorsRichard van der Hoff2018-10-011-106/+0
| |\ \ \ | | | | | | | | | | Fix exceptions when handling incoming transactions
| | * | | Merge remote-tracking branch 'origin/develop' into rav/fix_federation_errorsRichard van der Hoff2018-09-271-1/+1
| | |\| |
| | * | | Remove redundant, failing, testRichard van der Hoff2018-09-271-106/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test didn't do what it claimed to do, and what it claimed to do was the same as test_cant_hide_direct_ancestors anyway. This stuff is tested by sytest anyway.
| * | | | Fix userconsent on Python 3 (#3938)Amber Brown2018-10-024-95/+238
| | |/ / | |/| |
| * | | Merge pull request #3970 from schnuffle/develop-py3Amber Brown2018-09-271-1/+1
| |\ \ \ | | |/ / | |/| | Replaced all occurences of e.message with str(e)
| | * | Replaced all occurences of e.message with str(e)Schnuffle2018-09-271-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Schnuffle <schnuffle@github.com>
| * | | Include eventid in log lines when processing incoming federation ↵Richard van der Hoff2018-09-272-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | transactions (#3959) when processing incoming transactions, it can be hard to see what's going on, because we process a bunch of stuff in parallel, and because we may end up recursively working our way through a chain of three or four events. This commit creates a way to use logcontexts to add the relevant event ids to the log lines.
| * | | docstrings and unittests for storage.state (#3958)Richard van der Hoff2018-09-271-0/+39
| |/ / | | | | | | | | | I spent ages trying to figure out how I was going mad...
| * | Merge pull request #3932 from matrix-org/erikj/auto_start_expiring_cachesRichard van der Hoff2018-09-251-1/+0
| |\ \ | | | | | | | | Fix some instances of ExpiringCache not expiring cache items
| | * | Fix some instances of ExpiringCache not expiring cache itemsErik Johnston2018-09-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ExpiringCache required that `start()` be called before it would actually start expiring entries. A number of places didn't do that. This PR removes `start` from ExpiringCache, and automatically starts backround reaping process on creation instead.
| * | | Merge branch 'master' into developAmber Brown2018-09-251-2/+2
| |\ \ \ | | |/ / | |/| |
| | * | Fix compatibility issue with older Twisted in tests.Oleg Girko2018-09-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Older Twisted (18.4.0) returns TimeoutError instead of ConnectingCancelledError when connection times out. This change allows tests to be compatible with this behaviour. Signed-off-by: Oleg Girko <ol@infoserver.lv>
| * | | Fix client IPs being broken on Python 3 (#3908)Amber Brown2018-09-204-42/+202
| | | |
| * | | Add a regression test for logging on failed connections (#3912)Amber Brown2018-09-202-3/+74
| | | |
| * | | Refactor matrixfederationclient to fix logging (#3906)Richard van der Hoff2018-09-183-37/+122
| |/ / | | | | | | | | | | | | | | | | | | | | | We want to wait until we have read the response body before we log the request as complete, otherwise a confusing thing happens where the request appears to have completed, but we later fail it. To do this, we factor the salient details of a request out to a separate object, which can then keep track of the txn_id, so that it can be logged.
| * | TestsErik Johnston2018-09-141-0/+81
| | |
| * | Attempt to figure out what's going on with timeouts (#3857)Amber Brown2018-09-142-1/+198
| | |
| * | improve namingNeil Johnson2018-09-121-3/+3
| | |
| * | expose number of real reserved usersNeil Johnson2018-09-121-0/+31
| | |
| * | Port tests/ to Python 3 (#3808)Amber Brown2018-09-0711-430/+348
| | |