summary refs log tree commit diff
path: root/synapse/api (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Update constants.pyNeil Johnson2019-01-301-1/+1
| | | remove trailing ,
* Merge branch 'develop' into neilj/room_capabilitiesNeil Johnson2019-01-303-20/+43
|\
| * Enable room version v3Erik Johnston2019-01-291-1/+2
| |
| * Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2019-01-292-12/+3
| |\ | | | | | | | | | erikj/redactions_eiah
| | * Implement event format v2Erik Johnston2019-01-291-0/+2
| | |
| | * Remove dead functionErik Johnston2019-01-291-11/+0
| | |
| | * Replace usage of builder.user_id with builder.senderErik Johnston2019-01-291-1/+1
| | | | | | | | | | | | | | | `.user_id` is proxed to `.sender` in FrozenEvent, so this has no functional change
| * | Drop vdh supportErik Johnston2019-01-291-2/+0
| | |
| * | Finish comment...Erik Johnston2019-01-291-1/+1
| | |
| * | Implement rechecking of redactionsErik Johnston2019-01-291-2/+2
| | |
| * | Add RoomVersions.V3 constant, without enabling itErik Johnston2019-01-291-0/+1
| |/ | | | | | | | | | | We add the constant, but don't add it to the known room versions. This lets us start adding V3 logic, but the servers will never join or create V3 rooms
| * Pass through room version to event authErik Johnston2019-01-251-4/+10
| |
| * Merge pull request #4415 from matrix-org/anoa/full_search_upgraded_roomsAndrew Morgan2019-01-251-0/+14
| |\ | | | | | | Ability to search entire room history after upgrading room
| | * Update synapse/api/filtering.pyRichard van der Hoff2019-01-241-1/+1
| | | | | | | | | Co-Authored-By: anoadragon453 <1342360+anoadragon453@users.noreply.github.com>
| | * Ensure new filter is actually createdAndrew Morgan2019-01-221-1/+1
| | |
| | * Fix a bug with single-room search searching all roomsAndrew Morgan2019-01-221-2/+13
| | | | | | | | | | | | | | | * Create a new method for getting predecessor rooms * Remove formatting change
| | * Search for messages across predecessor roomsAndrew Morgan2019-01-181-0/+3
| | | | | | | | | | | | Signed-off-by: Andrew Morgan <andrew@amorgan.xyz>
| * | Merge pull request #4437 from matrix-org/erikj/event_format_version_v2Erik Johnston2019-01-241-0/+13
| |\ \ | | | | | | | | Add support for persisting event format versions
| | * | Add support for persisting event format versionsErik Johnston2019-01-231-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we only have the one event format version defined, but this adds the necessary infrastructure to persist and fetch the format versions alongside the events. We specify the format version rather than the room version as: 1. We don't necessarily know the room version, existing events may be either v1 or v2. 2. We'd need to be careful to prevent/handle correctly if different events in the same room reported to be of different versions, which sounds annoying.
* | | | define room dispositions for use in exposing room capabilitiesNeil Johnson2019-01-301-0/+5
| | | |
* | | | reflect that rooms v3 is a stable room versionNeil Johnson2019-01-301-0/+1
| | | |
* | | | backout v3Neil Johnson2019-01-251-1/+0
| | | |
* | | | track unstable room v3Neil Johnson2019-01-251-0/+2
|/ / /
* / / Fix None guard in config.server.is_threepid_reservedNeil Johnson2019-01-221-1/+3
|/ /
* | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2019-01-211-1/+2
|\ \ | | | | | | | | | erikj/fed_v2_invite_server
| * \ Merge pull request #4390 from matrix-org/erikj/versioned_fed_apisErik Johnston2019-01-211-1/+2
| |\ \ | | | | | | | | Add groundwork for new versions of federation APIs
| * | | Migrate encryption state on room upgrade (#4411)Andrew Morgan2019-01-211-0/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | * Migrate encryption state on room upgrade Signed-off-by: Andrew Morgan <andrew@amorgan.xyz> * Add changelog file
| * | ALL_USER_TYPES should be a tupleNeil Johnson2019-01-151-1/+1
| | |
* | | Add /v2/invite federation APIErik Johnston2019-01-151-0/+1
| |/ |/|
* | Add groundwork for new versions of federation APIsErik Johnston2019-01-151-1/+2
|/
* Merge branch rav/macaroon_key_fix_0.34 into rav/macaroon_key_fix_0.34.1Richard van der Hoff2019-01-101-38/+27
|\ | | | | | | Fixes #4371
| * Merge branch 'rav/macaroon_key_fix' into rav/macaroon_key_fix_0.34Richard van der Hoff2019-01-101-38/+27
| |\
| | * Skip macaroon check for access tokens in the dbRichard van der Hoff2019-01-101-38/+27
| | |
* | | Refactor request sending to have better excpetions (#4358)Erik Johnston2019-01-081-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | | fix the check for whether `is_url` to match all the other ones in codebase ↵Michael Telatynski2019-01-061-3/+8
| | | | | | | | | | | | | | | | | | (#3405) Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* | | Merge pull request #4307 from matrix-org/erikj/v2_roomsRichard van der Hoff2018-12-241-0/+2
|\ \ \ | | | | | | | | Add v2 room version
| * | | Add v2 room versionErik Johnston2018-12-181-0/+2
| | | |
* | | | create support user (#4141)Neil Johnson2018-12-142-2/+11
| |/ / |/| | | | | | | | | | | | | | 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.
* | | Add an option to enable recording IPs for appservice users (#3831)Travis Ralston2018-12-041-9/+20
|/ /
* | Merge pull request #4004 from matrix-org/travis/login-termsTravis Ralston2018-11-011-0/+1
|\ \ | | | | | | Add m.login.terms to the registration flow
| * \ Merge branch 'develop' into travis/login-termsTravis Ralston2018-10-312-1/+1
| |\ \
| * \ \ Merge branch 'develop' into travis/login-termsTravis Ralston2018-10-241-1/+4
| |\ \ \
| * \ \ \ Merge branch 'develop' into travis/login-termsTravis Ralston2018-10-151-0/+15
| |\ \ \ \
| * | | | | Incorporate Dave's work for GDPR login flowsTravis Ralston2018-10-031-0/+1
| | | | | | | | | | | | | | | | | | As per https://github.com/vector-im/riot-web/issues/7168#issuecomment-419996117
* | | | | | Add STATE_V2_TEST room versionErik Johnston2018-11-011-1/+6
| |_|_|/ / |/| | | |
* | | | | Remove deprecated v1 key exchange endpoint (#4119)Amber Brown2018-10-311-1/+0
| | | | |
* | | | | Basic initial support for room upgradesRichard van der Hoff2018-10-251-0/+1
| |_|/ / |/| | | | | | | | | | | | | | | Currently just creates a new, empty, room, and sends a tombstone in the old room.
* | | | Allow backslashes in event field filtersRichard van der Hoff2018-10-241-1/+4
| |/ / |/| | | | | | | | | | | | | | | | | | | | 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.
* | | PR feedback pt. 1David Baker2018-10-121-8/+0
| | |
* | | Fix mergefailDavid Baker2018-10-091-1/+1
| | |
* | | Merge remote-tracking branch 'origin/develop' into dbkr/e2e_backupsDavid Baker2018-10-094-9/+23
|\| |
| * | Fix userconsent on Python 3 (#3938)Amber Brown2018-10-021-1/+1
| | |
| * | Replaced all occurences of e.message with str(e)Schnuffle2018-09-271-1/+1
| | | | | | | | | | | | Signed-off-by: Schnuffle <schnuffle@github.com>
| * | Implement 'event_format' filter param in /syncRichard van der Hoff2018-09-041-0/+1
| | | | | | | | | | | | | | | This has been specced and part-implemented; let's implement it for /sync (but no other endpoints yet :/).
| * | assert rather than warn hhs-4Neil Johnson2018-08-311-3/+2
| | |
| * | move threepid checker to config, add missing yieldsNeil Johnson2018-08-311-2/+11
| | |
| * | fix reference to is_threepid_reservedNeil Johnson2018-08-311-1/+1
| | |
| * | ensure post registration auth checks do not fail erroneouslyNeil Johnson2018-08-311-5/+2
| | |
| * | fix bug where preserved threepid user comes to sign up and server is mau blockedNeil Johnson2018-08-311-1/+9
| | |
| * | Change admin_uri to admin_contact in config and errorsErik Johnston2018-08-242-5/+5
| | |
* | | try to make flake8 and isort happyHubert Chathi2018-09-061-0/+1
| | |
* | | Merge branch 'develop' into e2e_backupsHubert Chathi2018-08-244-12/+113
|\| |
| * | Implement trail usersErik Johnston2018-08-231-1/+5
| | |
| * | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2018-08-223-11/+15
| |\ \ | | | | | | | | | | | | neilj/server_notices_on_blocking
| | * \ Merge pull request #3673 from matrix-org/erikj/refactor_state_handlerErik Johnston2018-08-221-2/+7
| | |\ \ | | | | | | | | | | Refactor state module to support multiple room versions
| | | * \ Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2018-08-202-8/+48
| | | |\ \ | | | | | | | | | | | | | | | | | | erikj/refactor_state_handler
| | | * | | Add constants for room versionsErik Johnston2018-08-091-2/+7
| | | | | |
| | * | | | Port over enough to get some sytests running on Python 3 (#3668)Amber Brown2018-08-202-8/+8
| | | |/ / | | |/| |
| * | | | Update notice formatErik Johnston2018-08-221-2/+4
| | | | |
| * | | | rename error codeNeil Johnson2018-08-182-4/+4
| | | | |
| * | | | special case server_notices_mxidNeil Johnson2018-08-181-0/+6
| | | | |
| * | | | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Neil Johnson2018-08-172-6/+28
| |\| | | | | | | | | | | | | | | | | | neilj/server_notices_on_blocking
| | * | | Merge branch 'develop' into neilj/limit_exceeded_errorNeil Johnson2018-08-171-1/+2
| | |\ \ \
| | * | | | add new error type ResourceLimitNeil Johnson2018-08-162-6/+27
| | | | | |
| * | | | | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Neil Johnson2018-08-171-1/+1
| |\ \ \ \ \ | | | |/ / / | | |/| | | | | | | | | neilj/server_notices_on_blocking
| | * | | | call reap on start up and fix under reaping bugNeil Johnson2018-08-161-1/+1
| | |/ / /
| * | | | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Neil Johnson2018-08-152-9/+18
| |\| | | | | | | | | | | | | | | | | | neilj/server_notices_on_blocking
| | * | | clean up AuthErrorNeil Johnson2018-08-151-7/+3
| | | | |
| | * | | update error codes for resource limitingNeil Johnson2018-08-151-2/+1
| | | | |
| | * | | replace admin_email with admin_uri for greater flexibilityNeil Johnson2018-08-152-7/+7
| | | | |
| | * | | Merge branch 'develop' of github.com:matrix-org/synapse into neilj/admin_emailNeil Johnson2018-08-141-1/+11
| | |\ \ \
| | | * | | make comments clearerNeil Johnson2018-08-141-1/+2
| | | | | |
| | * | | | support admin_email config and pass through into blocking errors, return ↵Neil Johnson2018-08-132-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | AuthError in all cases
| | * | | | Revert "support admin_email config and pass through into blocking errors, ↵Neil Johnson2018-08-132-17/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | return AuthError in all cases" This reverts commit 0d43f991a19840a224d3dac78d79f13d78212ee6.
| | * | | | support admin_email config and pass through into blocking errors, return ↵Neil Johnson2018-08-132-4/+17
| | | |/ / | | |/| | | | | | | | | | | | AuthError in all cases
| * | | | add new event typesNeil Johnson2018-08-151-0/+1
| | | | |
| * | | | support server notice state events for resource limitsNeil Johnson2018-08-141-0/+2
| | |/ / | |/| |
| * | | rename _user_last_seen_monthly_activeNeil Johnson2018-08-091-1/+1
| | | |
| * | | fix errant parenthesisNeil Johnson2018-08-091-1/+1
| | | |
| * | | only block on sync where user is not part of the mau cohortNeil Johnson2018-08-091-2/+11
| |/ /
| * | fix pep8 too many linesNeil Johnson2018-08-081-1/+0
| | |
| * | Merge branch 'develop' into neilj/disable_hsNeil Johnson2018-08-082-0/+34
| |\ \
| | * \ Merge pull request #3654 from matrix-org/rav/room_versionsRichard van der Hoff2018-08-082-0/+33
| | |\ \ | | | | | | | | | | Support for room versioning
| | | * | Don't expose default_room_version as config optRichard van der Hoff2018-08-071-0/+3
| | | | |
| | | * | Enforce compatibility when processing make_join requestsRichard van der Hoff2018-08-031-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reject make_join requests from servers which do not support the room version. Also include the room version in the response.
| | | * | Basic support for room versioningRichard van der Hoff2018-08-032-0/+8
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first tranche of support for room versioning. It includes: * setting the default room version in the config file * new room_version param on the createRoom API * storing the version of newly-created rooms in the m.room.create event * fishing the version of existing rooms out of the m.room.create event
| * | | Merge branch 'neilj/mau_tracker' of github.com:matrix-org/synapse into ↵Neil Johnson2018-08-061-4/+1
| |\| | | | | | | | | | | | | | neilj/disable_hs
| | * | update comments to reflect new sigNeil Johnson2018-08-061-4/+1
| | | |
| * | | disable HS from configNeil Johnson2018-08-042-0/+5
| |/ /
| * | wip commit - tests failingNeil Johnson2018-08-031-2/+4
| | |
| * | Merge branch 'develop' of github.com:matrix-org/synapse into neilj/mau_trackerNeil Johnson2018-08-031-53/+53
| |\|
| * | do mau checks based on monthly_active_users tableNeil Johnson2018-08-021-0/+13
| | |
| * | insertion into monthly_active_usersNeil Johnson2018-08-021-1/+1
| | |
* | | blindly incorporate PR review - needs testing & fixingMatthew Hodgson2018-08-121-3/+8
| | |
* | | implement /room_keys/version too (untested)Matthew Hodgson2018-08-121-0/+25
| |/ |/|
* | Merge pull request #3639 from matrix-org/rav/refactor_error_handlingRichard van der Hoff2018-08-021-53/+53
|\ \ | |/ |/| Clean up handling of errors from outbound requests
| * Kill off MatrixCodeMessageExceptionRichard van der Hoff2018-08-011-11/+0
| | | | | | | | | | | | | | | | | | | | | | This code brings the SimpleHttpClient into line with the MatrixFederationHttpClient by having it raise HttpResponseExceptions when a request fails (rather than trying to parse for matrix errors and maybe raising MatrixCodeMessageException). Then, whenever we were checking for MatrixCodeMessageException and turning them into SynapseErrors, we now need to check for HttpResponseExceptions and call to_synapse_error.
| * Refactor code for turning HttpResponseException into SynapseErrorRichard van der Hoff2018-08-011-31/+53
| | | | | | | | | | | | | | | | This commit replaces SynapseError.from_http_response_exception with HttpResponseException.to_synapse_error. The new method actually returns a ProxiedRequestError, which allows us to pass through additional metadata from the API call.
| * Be more careful which errors we send back over the C-S APIRichard van der Hoff2018-08-011-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | We really shouldn't be sending all CodeMessageExceptions back over the C-S API; it will include things like 401s which we shouldn't proxy. That means that we need to explicitly turn a few HttpResponseExceptions into SynapseErrors in the federation layer. The effect of the latter is that the matrix errcode will get passed through correctly to calling clients, which might help with some of the random M_UNKNOWN errors when trying to join rooms.
* | Merge pull request #3630 from matrix-org/neilj/mau_sign_in_log_in_limitsNeil Johnson2018-08-011-0/+1
|\ \ | |/ |/| Initial impl of capping MAU
| * limit register and sign in on number of monthly usersNeil Johnson2018-07-301-0/+1
| |
* | Python 3: Convert some unicode/bytes uses (#3569)Amber Brown2018-08-021-2/+2
|/
* Deduplicate redundant lazy-loaded members (#3331)Matthew Hodgson2018-07-261-0/+9
| | | | | | | | | | | | | | | | | | | | * attempt at deduplicating lazy-loaded members as per the proposal; we can deduplicate redundant lazy-loaded members which are sent in the same sync sequence. we do this heuristically rather than requiring the client to somehow tell us which members it has chosen to cache, by instead caching the last N members sent to a client, and not sending them again. For now we hardcode N to 100. Each cache for a given (user,device) tuple is in turn cached for up to X minutes (to avoid the caches building up). For now we hardcode X to 30. * add include_redundant_members filter option & make it work * remove stale todo * add tests for _get_some_state_from_cache * incorporate review
* Merge branch 'develop' into matthew/filter_membersMatthew Hodgson2018-07-241-0/+34
|\
| * Merge branch 'develop' into erikj/client_apis_moveErik Johnston2018-07-241-2/+4
| |\
| * | Move check_in_room_or_world_readable to AuthErik Johnston2018-07-201-0/+34
| | |
* | | Merge branch 'develop' into matthew/filter_membersMatthew Hodgson2018-07-231-2/+4
|\ \ \ | | |/ | |/|
| * | Use new gettersErik Johnston2018-07-231-2/+4
| |/
* | merge develop pydoc for _get_state_for_groupsMatthew Hodgson2018-07-195-75/+86
|\|
| * Make auth & transactions more testable (#3499)Amber Brown2018-07-141-62/+62
| |
| * run isortAmber Brown2018-07-094-13/+14
| |
| * Implementation of server_aclsRichard van der Hoff2018-07-041-0/+2
| | | | | | | | | | ... as described at https://docs.google.com/document/d/1EttUVzjc2DWe2ciw4XPtNpUpIl9lWXGEsy2ewDS7rtw.
| * add ip_range_whitelist parameter to limit where ASes can connect fromMatthew Hodgson2018-06-281-0/+6
| |
| * Attempt to be more performant on PyPy (#3462)Amber Brown2018-06-282-2/+4
| |
| * Don't print invalid access tokens in the logsTravis Ralston2018-06-241-2/+2
| | | | | | | | | | Tokens shouldn't be appearing the logs, valid or invalid. Signed-off-by: Travis Ralston <travpc@gmail.com>
| * Refactor get_send_level to take a power_levels eventRichard van der Hoff2018-06-141-1/+1
| | | | | | | | it makes it easier for me to reason about
* | Merge branch 'develop' into matthew/filter_membersMatthew Hodgson2018-06-042-2/+4
|\|
| * Consistently use six's iteritems and wrap lazy keys/values in list() if ↵Amber Brown2018-05-312-2/+4
| | | | | | | | they're not meant to be lazy (#3307)
* | add lazy_load_members to the filter json schemaMatthew Hodgson2018-05-291-1/+4
| |
* | merge developMatthew Hodgson2018-05-295-10/+94
|\|
| * Merge remote-tracking branch 'origin/develop' into 3218-official-promAmber Brown2018-05-281-0/+1
| |\
| | * custom error code for not leaving server notices roomRichard van der Hoff2018-05-221-0/+1
| | |
| * | Merge remote-tracking branch 'origin/develop' into 3218-official-promAmber Brown2018-05-222-1/+79
| |\|
| | * Reject attempts to send event before privacy consent is givenRichard van der Hoff2018-05-222-1/+79
| | | | | | | | | | | | | | | | | | Returns an M_CONSENT_NOT_GIVEN error (cf https://github.com/matrix-org/matrix-doc/issues/1252) if consent is not yet given.
| * | replacing portionsAmber Brown2018-05-211-1/+1
| |/
| * Apply some limits to depth to counter abuseRichard van der Hoff2018-05-011-0/+3
| | | | | | | | | | | | | | * When creating a new event, cap its depth to 2^63 - 1 * When receiving events, reject any without a sensible depth As per https://docs.google.com/document/d/1I3fi2S-XnpO45qrpCsowZv8P8dHcNZ4fsBsbOW7KABI
| * Use six.itervalues in some placesAdrian Tschira2018-04-151-1/+2
| | | | | | | | | | | | There's more where that came from Signed-off-by: Adrian Tschira <nota@notafile.com>
| * Add b prefixes to some strings that are bytes in py3Adrian Tschira2018-04-041-5/+5
| | | | | | | | | | | | This has no effect on python2 Signed-off-by: Adrian Tschira <nota@notafile.com>
| * Use simplejson throughoutRichard van der Hoff2018-03-291-1/+2
| | | | | | | | Let's use simplejson rather than json, for consistency.
| * Merge branch 'master' of github.com:matrix-org/synapse into developErik Johnston2018-03-191-1/+1
| |\
| | * Replace ujson with simplejsonErik Johnston2018-03-151-1/+1
| | |
* | | make lazy_load_members configurable in filtersMatthew Hodgson2018-03-191-0/+6
|/ /
* | Add federation_domain_whitelist option (#2820)Matthew Hodgson2018-01-221-0/+26
| | | | | | | | | | | | Add federation_domain_whitelist gives a way to restrict which domains your HS is allowed to federate with. useful mainly for gracefully preventing a private but internet-connected HS from trying to federate to the wider public Matrix network
* | add registrations_require_3pidMatthew Hodgson2018-01-191-0/+1
|/ | | | | lets homeservers specify a whitelist for 3PIDs that users are allowed to associate with. Typically useful for stopping people from registering with non-work emails
* Refactor UI auth implementationRichard van der Hoff2017-12-051-0/+16
| | | | | Instead of returning False when auth is incomplete, throw an exception which can be caught with a wrapper.
* Improve comments on get_user_by_access_tokenRichard van der Hoff2017-11-291-1/+5
| | | | because I have to reverse-engineer this every time.
* Add a config option to block all room invites (#2457)Richard van der Hoff2017-09-191-0/+8
| | | | | - allows sysadmins the ability to lock down their servers so that people can't send their users room invites.
* Merge pull request #2309 from matrix-org/erikj/user_ip_replErik Johnston2017-07-061-1/+1
|\ | | | | Fix up user_ip replication commands
| * Fix upErik Johnston2017-06-271-1/+1
| |
* | Cache macaroon parse and validationErik Johnston2017-06-291-13/+60
|/ | | | | | Turns out this can be quite expensive for requests, and is easily cachable. We don't cache the lookup to the DB so invalidation still works.
* Batch upsert user ipsErik Johnston2017-06-271-2/+1
|
* Change is_host_joined to use current_state tableErik Johnston2017-06-091-11/+2
| | | | | | This bypasses a bug where using the state groups to figure out if a host is in a room sometimes errors if the servers isn't in the room. (For example when the server rejected an invite to a remote room)
* Use CodeMessageException subclass insteadDavid Baker2017-04-251-0/+11
| | | | | Parse json errors from get_json client methods and throw special errors.
* use jsonschema.FormatChecker for RoomID and UserID stringspik2017-03-231-18/+27
| | | | | | * use a valid filter in rest/client/v2_alpha test Signed-off-by: pik <alexander.maznev@gmail.com>
* Add valid filter tests, flake8, fix typopik2017-03-231-5/+6
| | | | Signed-off-by: pik <alexander.maznev@gmail.com>
* check_valid_filter using JSONSchemapik2017-03-231-93/+158
| | | | | | * add invalid filter tests Signed-off-by: pik <alexander.maznev@gmail.com>
* Fix a couple of logcontext leaksRichard van der Hoff2017-03-231-3/+2
| | | | | Use preserve_fn to correctly manage the logcontexts around things we don't want to yield on.
* CommentErik Johnston2017-03-151-1/+3
|
* CommentErik Johnston2017-03-151-0/+3
|
* Format presence events on the edges instead of reformatting them multiple timesErik Johnston2017-03-151-10/+22
|
* Merge pull request #1994 from matrix-org/dbkr/msisdn_signin_2Erik Johnston2017-03-151-0/+2
|\ | | | | Phone number registration / login support v2
| * Support registration / login with phone numberDavid Baker2017-03-131-0/+2
| | | | | | | | Changes from https://github.com/matrix-org/synapse/pull/1971
* | Address review commentsRichard van der Hoff2017-03-141-5/+14
| | | | | | | | | | | | | | - don't blindly proxy all HTTPRequestExceptions - log unexpected exceptions at error - avoid `isinstance` - improve docs on `from_http_response_exception`
* | re-refactor exception heirarchyRichard van der Hoff2017-03-141-16/+14
| | | | | | | | | | Give CodeMessageException back its `msg` attribute, and use that to hold the HTTP status message for HttpResponseException.
* | Fix routing loop when fetching remote mediaRichard van der Hoff2017-03-131-7/+52
|/ | | | | | | | | | | 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.
* Revert "Support registration & login with phone number"Erik Johnston2017-03-131-2/+0
|
* WIP support for msisdn 3pid proxy methodsDavid Baker2017-02-141-0/+2
|
* Remove a few aspirational but unused constantsDavid Baker2017-02-081-3/+0
| | | | from the Kegan era
* Change resolve_state_groups call site logging to DEBUGErik Johnston2017-01-171-1/+1
|
* Remove unused functionErik Johnston2017-01-131-3/+0
|
* Split event auth code into seperate moduleErik Johnston2017-01-131-645/+9
|
* Split out static auth methods from Auth objectErik Johnston2017-01-101-419/+495
|
* Fix flake8 and update changelog v0.18.6-rc3Mark Haines2017-01-051-1/+1
|
* add logging for all the places we call resolve_state_groups. my kingdom for ↵Matthew Hodgson2017-01-051-0/+1
| | | | a backtrace that actually works.
* Prevent user tokens being used as guest tokens (#1675)Richard van der Hoff2016-12-061-15/+36
| | | | | Make sure that a user cannot pretend to be a guest by adding 'guest = True' caveats.
* Rip out more refresh_token codeRichard van der Hoff2016-11-301-3/+2
| | | | | | | | 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.
* Merge pull request #1656 from matrix-org/rav/remove_time_caveatRichard van der Hoff2016-11-301-3/+13
|\ | | | | Stop putting a time caveat on access tokens
| * CommentsRichard van der Hoff2016-11-301-3/+9
| | | | | | | | Update comments in verify_macaroon
| * Stop putting a time caveat on access tokensRichard van der Hoff2016-11-291-0/+4
| | | | | | | | | | | | | | | | 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.
* | Merge pull request #1653 from matrix-org/rav/guest_e2eRichard van der Hoff2016-11-291-1/+5
|\ \ | |/ |/| Implement E2E for guests
| * Give guest users a device_idRichard van der Hoff2016-11-251-1/+5
| | | | | | | | | | 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.
* | Merge pull request #1655 from matrix-org/rav/remove_redundant_macaroon_checksRichard van der Hoff2016-11-251-26/+8
|\ \ | | | | | | Remove redundant list of known caveat prefixes
| * | Remove redundant list of known caveat prefixesRichard van der Hoff2016-11-241-26/+8
| |/ | | | | | | Also add some comments.
* / Return early on /sync code paths if a '*' filter is usedKegan Dougal2016-11-221-0/+29
|/ | | | | | | | This is currently very conservative in that it only does this if there is no `since` token. This limits the risk to clients likely to be doing one-off syncs (like bridges), but does mean that normal human clients won't benefit from the time savings here. If the savings are large enough, I would consider generalising this to just check the filter.
* Merge pull request #1638 from matrix-org/kegan/sync-event-fieldsKegsay2016-11-221-0/+16
|\ | | | | Implement "event_fields" in filters
| * Glue only_event_fields into the sync rest servletKegan Dougal2016-11-221-0/+1
| |
| * Move event_fields filtering to serialize_eventKegan Dougal2016-11-211-55/+1
| | | | | | | | Also make it an inclusive not exclusive filter, as the spec demands.
| * Add filter_event_fields and filter_field to FilterCollectionKegan Dougal2016-11-211-0/+69
| |
* | Fail with a coherent error message if `/sync?filter=` is invalidKegan Dougal2016-11-211-0/+1
|/
* Merge pull request #1098 from matrix-org/markjh/bearer_tokenMark Haines2016-10-251-9/+37
|\ | | | | Allow clients to supply access_tokens as headers
| * Fix unit testsMark Haines2016-09-121-1/+1
| |
| * Allow clients to supply access_tokens as headersMark Haines2016-09-091-9/+37
| | | | | | | | | | | | | | | | | | | | Clients can continue to supply access tokens as query parameters or can supply the token as a header: Authorization: Bearer <access_token_goes_here> This matches the ouath2 format of https://tools.ietf.org/html/rfc6750#section-2.1
* | Merge pull request #1175 from ↵Luke Barnard2016-10-201-7/+10
|\ \ | | | | | | | | | | | | matrix-org/luke/feature-configurable-as-rate-limiting Allow Configurable Rate Limiting Per AS
| * | Closing brace on following lineLuke Barnard2016-10-201-1/+2
| | |
| * | as_user->app_service, less redundant comments, better positioned commentsLuke Barnard2016-10-201-3/+3
| | |
| * | flake8Luke Barnard2016-10-201-1/+3
| | |
| * | Use real AS object by passing it through the requesterLuke Barnard2016-10-201-7/+7
| | | | | | | | | | | | This means synapse does not have to check if the AS is interested, but instead it effectively re-uses what it already knew about the requesting user
* | | Check whether to ratelimit sooner to avoid workErik Johnston2016-10-191-5/+9
|/ /
* | Merge pull request #1157 from Rugvip/nolimitErik Johnston2016-10-111-4/+3
|\ \ | | | | | | Remove rate limiting from app service senders and fix get_or_create_user requester
| * | storage/appservice: make appservice methods only relying on the cache ↵Patrik Oldsberg2016-10-061-4/+3
| | | | | | | | | | | | synchronous
* | | api/auth: fix for not being allowed to set your own state_keyPatrik Oldsberg2016-09-301-10/+0
|/ / | | | | | | Signed-off-by: Patrik Oldsberg <patrik.oldsberg@ericsson.com>
* | Update commentsErik Johnston2016-09-221-2/+3
| |
* | Add commentsErik Johnston2016-09-221-0/+3
| |
* | Shuffle things around to make unit tests workErik Johnston2016-09-221-14/+15
| |
* | Allow invites via 3pid to bypass sender sig checkErik Johnston2016-09-221-1/+16
|/ | | | | | | | | | | | | | When a server sends a third party invite another server may be the one that the inviting user registers with. In this case it is that remote server that will issue an actual invitation, and wants to do it "in the name of" the original invitee. However, the new proper invite will not be signed by the original server, and thus other servers would reject the invite if it was seen as coming from the original user. To fix this, a special case has been added to the auth rules whereby another server can send an invite "in the name of" another server's user, so long as that user had previously issued a third party invite that is now being accepted.
* Add helper function for getting access_tokens from requestsMark Haines2016-09-091-7/+51
| | | | | | 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.
* Handle the fact that workers can't generate state groupsErik Johnston2016-08-311-2/+4
|
* Correctly handle the difference between prev and current stateErik Johnston2016-08-311-2/+2
|
* Cache check_host_in_roomErik Johnston2016-08-261-14/+6
|
* Add measure on check_host_in_roomErik Johnston2016-08-261-11/+12
|
* Merge branch 'develop' of github.com:matrix-org/synapse into erikj/state_idsErik Johnston2016-08-262-1/+5
|\
| * Move ThirdPartyEntityKind into api.constants so the expectation becomes that ↵Paul "LeoNerd" Evans2016-08-251-0/+5
| | | | | | | | the value is significant
| * APP_SERVICE_PREFIX is never used; don't botherPaul "LeoNerd" Evans2016-08-251-1/+0
| |
* | Pull out full state lessErik Johnston2016-08-251-6/+7
| |
* | Replace context.current_state with context.current_state_idsErik Johnston2016-08-251-24/+44
|/
* Fix login with m.login.tokenRichard van der Hoff2016-08-081-15/+30
| | | | | login with token (as used by CAS auth) was broken by 067596d, such that it always returned a 401.
* Merge pull request #952 from matrix-org/markjh/more_fixesMark Haines2016-07-261-0/+4
|\ | | | | Check if the user is banned when handling 3pid invites
| * Check if the user is banned when handling 3pid invitesMark Haines2016-07-261-0/+4
| |
* | Add `create_requester` functionRichard van der Hoff2016-07-261-13/+11
|/ | | | | Wrap the `Requester` constructor with a function which provides sensible defaults, and use it throughout
* Record device_id in client_ipsRichard van der Hoff2016-07-201-6/+23
| | | | | Record the device_id when we add a client ip; it's somewhat redundant as we could get it via the access_token, but it will make querying rather easier.
* More doc-commentsRichard van der Hoff2016-07-201-3/+2
| | | | Fix some more comments on some things
* Merge pull request #922 from matrix-org/erikj/file_api2Erik Johnston2016-07-201-3/+20
|\ | | | | Feature: Add filter to /messages. Add 'contains_url' to filter.
| * Add 'contains_url' to filterErik Johnston2016-07-141-3/+20
| |
* | Fix 500 ISE when sending alias event without a state_keyMark Haines2016-07-151-0/+5
| |
* | Merge pull request #919 from matrix-org/erikj/auth_fixErik Johnston2016-07-151-1/+25
|\ \ | | | | | | Various auth.py fixes.
| * | Check sender signed eventErik Johnston2016-07-141-2/+8
| | |
| * | Check if alias event's state_key matches sender's domainErik Johnston2016-07-131-0/+11
| | |
| * | Check creation event's room_id domain matches sender'sErik Johnston2016-07-131-0/+7
| | |
* | | Merge pull request #918 from negzi/bugfix_for_token_expiryErik Johnston2016-07-141-0/+3
|\ \ \ | |_|/ |/| | Bug fix: expire invalid access tokens
| * | Bug fix: expire invalid access tokensNegar Fazeli2016-07-131-0/+3
| |/
* / Implement https://github.com/matrix-org/matrix-doc/pull/346/filesDavid Baker2016-07-081-0/+1
|/
* Merge branch 'master' of github.com:matrix-org/synapse into developErik Johnston2016-07-081-5/+10
|\
| * Fix bug where we did not correctly explode when multiple user_ids were set ↵Erik Johnston2016-07-071-5/+10
| | | | | | | | in macaroon
* | requestToken updateDavid Baker2016-06-301-1/+2
|/ | | | | | Don't send requestToken request to untrusted ID servers Also correct the THREEPID_IN_USE error to add the M_ prefix. This is a backwards incomaptible change, but the only thing using this is the angular client which is now unmaintained, so it's probably better to just do this now.
* Working unsubscribe links going straight to the HSDavid Baker2016-06-021-0/+7
| | | | and authed by macaroons that let you delete pushers and nothing else
* Merge remote-tracking branch 'origin/develop' into dbkr/email_unsubscribeDavid Baker2016-06-021-0/+18
|\
| * special case m.room.third_party_invite event auth to match invites, ↵Matthew Hodgson2016-06-011-0/+18
| | | | | | | | otherwise they get out of sync and you get https://github.com/vector-im/vector-web/issues/1208
* | WIP on unsubscribing email notifs without logging inDavid Baker2016-06-011-9/+16
|/
* Spell "domain" correctlyMark Haines2016-05-161-8/+8
| | | | s/domian/domain/g
* Create user with expiryNegi Fazeli2016-05-131-1/+2
| | | | | | - Add unittests for client, api and handler Signed-off-by: Negar Fazeli <negar.fazeli@ericsson.com>
* Merge branch 'develop' of github.com:matrix-org/synapse into erikj/ignore_userErik Johnston2016-05-091-8/+8
|\
| * Add and use get_domian_from_idErik Johnston2016-05-091-8/+8
| |
* | Implement basic ignore userErik Johnston2016-05-041-3/+5
|/
* Measure Auth.checkErik Johnston2016-04-131-47/+50
|
* Don't auto log failed auth checksErik Johnston2016-04-131-53/+45
|
* Add published room list edit APIErik Johnston2016-03-211-4/+50
|
* Send the user ID matching the guest access token, since there is no Matrix ↵David Baker2016-03-071-2/+2
| | | | API to discover what user ID an access token is for.
* Allow third_party_signed to be specified on /joinDaniel Wagner-Hall2016-02-231-21/+36
|
* Merge pull request #582 from matrix-org/erikj/presenceErik Johnston2016-02-191-1/+0
|\ | | | | Rewrite presence for performance.
| * Check presence state is a valid oneErik Johnston2016-02-181-1/+0
| |