Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Correctly mention previous copyright (#16820) | Erik Johnston | 2024-01-23 | 1 | -0/+1 |
| | | | | | During the migration the automated script to update the copyright headers accidentally got rid of some of the existing copyright lines. Reinstate them. | ||||
* | Filter out rooms from the room directory being served to other homeservers ↵ | reivilibre | 2024-01-08 | 1 | -50/+127 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when those rooms block that homeserver by their Access Control Lists. (#16759) The idea here being that the directory server shouldn't advertise rooms to a requesting server is the requesting server would not be allowed to join or participate in the room. <!-- Fixes: # <!-- --> <!-- Supersedes: # <!-- --> <!-- Follows: # <!-- --> <!-- Part of: # <!-- --> Base: `develop` <!-- git-stack-base-branch:develop --> <!-- This pull request is commit-by-commit review friendly. <!-- --> <!-- This pull request is intended for commit-by-commit review. <!-- --> Original commit schedule, with full messages: <ol> <li> Pass `from_federation_origin` down into room list retrieval code </li> <li> Don't cache /publicRooms response for inbound federated requests </li> <li> fixup! Don't cache /publicRooms response for inbound federated requests </li> <li> Cap the number of /publicRooms entries to 100 </li> <li> Simplify code now that you can't request unlimited rooms </li> <li> Filter out rooms from federated requests that don't have the correct ACL </li> <li> Request a handful more when filtering ACLs so that we can try to avoid shortchanging the requester </li> </ol> --------- Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org> | ||||
* | Update license headers | Patrick Cloke | 2023-11-21 | 1 | -10/+16 |
| | |||||
* | Remove remaining usage of cursor_to_dict. (#16564) | Patrick Cloke | 2023-10-31 | 1 | -22/+21 |
| | |||||
* | mypy plugin to check `@cached` return types (#14911) | David Robertson | 2023-10-02 | 1 | -2/+2 |
| | | | | | | | | Co-authored-by: David Robertson <davidr@element.io> Co-authored-by: Patrick Cloke <patrickc@matrix.org> Co-authored-by: Erik Johnston <erik@matrix.org> Assert that the return type of callables wrapped in @cached and @cachedList are cachable (aka immutable). | ||||
* | Use stable prefixes for MSC3827: filtering of `/publicRooms` by room type ↵ | Šimon Brandner | 2022-07-27 | 1 | -1/+1 |
| | | | | | | (#13370) Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> | ||||
* | Implement MSC3827: Filtering of `/publicRooms` by room type (#13031) | Šimon Brandner | 2022-06-29 | 1 | -3/+20 |
| | | | | Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> | ||||
* | Wait for lazy join to complete when getting current state (#12872) | Erik Johnston | 2022-06-01 | 1 | -1/+2 |
| | |||||
* | Remove `HomeServer.get_datastore()` (#12031) | Richard van der Hoff | 2022-02-23 | 1 | -1/+1 |
| | | | | | | | The presence of this method was confusing, and mostly present for backwards compatibility. Let's get rid of it. Part of #11733 | ||||
* | Convert all namedtuples to attrs. (#11665) | Patrick Cloke | 2021-12-30 | 1 | -13/+9 |
| | | | To improve type hints throughout the code. | ||||
* | Remove the deprecated BaseHandler. (#11005) | Patrick Cloke | 2021-10-08 | 1 | -4/+3 |
| | | | | | | | | The shared ratelimit function was replaced with a dedicated RequestRatelimiter class (accessible from the HomeServer object). Other properties were copied to each sub-class that inherited from BaseHandler. | ||||
* | Use direct references for configuration variables (part 5). (#10897) | Patrick Cloke | 2021-09-24 | 1 | -1/+1 |
| | |||||
* | Require type hints in the handlers module. (#10831) | Patrick Cloke | 2021-09-20 | 1 | -6/+6 |
| | | | | | | | Adds missing type hints to methods in the synapse.handlers module and requires all methods to have type hints there. This also removes the unused construct_auth_difference method from the FederationHandler. | ||||
* | Add a constant for m.federate. (#10775) | Patrick Cloke | 2021-09-08 | 1 | -1/+3 |
| | |||||
* | Move `maybe_kick_guest_users` out of `BaseHandler` (#10744) | Richard van der Hoff | 2021-09-06 | 1 | -3/+9 |
| | | | This is part of my ongoing war against BaseHandler. I've moved kick_guest_users into RoomMemberHandler (since it calls out to that handler anyway), and split maybe_kick_guest_users into the two places it is called. | ||||
* | Fix exceptions in logs when failing to get remote room list (#10541) | Erik Johnston | 2021-08-06 | 1 | -18/+28 |
| | |||||
* | Fix exception when failing to get remote room list (#10414) | Erik Johnston | 2021-07-20 | 1 | -1/+5 |
| | |||||
* | Use inline type hints in `handlers/` and `rest/`. (#10382) | Jonathan de Jong | 2021-07-16 | 1 | -9/+9 |
| | |||||
* | Fix a number of logged errors caused by remote servers being down. (#10400) | Erik Johnston | 2021-07-15 | 1 | -9/+17 |
| | |||||
* | Integrate knock rooms with the public rooms directory (#9359) | Andrew Morgan | 2021-06-09 | 1 | -0/+1 |
| | | | | | | | | | | This PR implements the ["Changes regarding the Public Rooms Directory"](https://github.com/Sorunome/matrix-doc/blob/soru/knock/proposals/2403-knock.md#changes-regarding-the-public-rooms-directory) section of knocking MSC2403. Specifically, it: * Allows rooms with `join_rule` "knock" to be returned by the query behind the public rooms directory * Adds the field `join_rule` to each room entry returned by a public rooms directory query, so clients can know whether to attempt a join or knock on a room Based on https://github.com/matrix-org/synapse/issues/6739. Complement tests for this change: https://github.com/matrix-org/complement/pull/72 | ||||
* | Add type hints to the federation server transport. (#10080) | Patrick Cloke | 2021-06-08 | 1 | -3/+3 |
| | |||||
* | Remove redundant "coding: utf-8" lines (#9786) | Jonathan de Jong | 2021-04-14 | 1 | -1/+0 |
| | | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>` | ||||
* | Import HomeServer from the proper module. (#9665) | Patrick Cloke | 2021-03-23 | 1 | -1/+1 |
| | |||||
* | Add ResponseCache tests. (#9458) | Jonathan de Jong | 2021-03-08 | 1 | -2/+2 |
| | |||||
* | Add type hints to admin and room list handlers. (#8973) | Patrick Cloke | 2020-12-29 | 1 | -43/+51 |
| | |||||
* | Do not assume that the contents dictionary includes history_visibility. (#8945) | Patrick Cloke | 2020-12-16 | 1 | -3/+4 |
| | |||||
* | Simplify super() calls to Python 3 syntax. (#8344) | Patrick Cloke | 2020-09-18 | 1 | -1/+1 |
| | | | | | | | This converts calls like super(Foo, self) -> super(). Generated with: sed -i "" -Ee 's/super\([^\(]+\)/super()/g' **/*.py | ||||
* | Convert room list handler to async/await. (#7912) | Patrick Cloke | 2020-07-21 | 1 | -33/+29 |
| | |||||
* | Replace iteritems/itervalues/iterkeys with native versions. (#7692) | Patrick Cloke | 2020-06-15 | 1 | -3/+1 |
| | |||||
* | Fix 'FederationGroupsRoomsServlet' API when group has room server is not in. ↵ | Erik Johnston | 2020-05-29 | 1 | -8/+12 |
| | | | | (#7599) | ||||
* | Apply federation check for /publicRooms with filter list (#7367) | Andrew Morgan | 2020-04-30 | 1 | -1/+5 |
| | |||||
* | Improve error responses when a remote server doesn't allow you to access its ↵ | Andrew Morgan | 2020-04-06 | 1 | -11/+12 |
| | | | | public rooms list (#6899) | ||||
* | Stop returning aliases as part of the room list. (#6970) | Patrick Cloke | 2020-02-21 | 1 | -9/+0 |
| | |||||
* | Remove unused public room list timeout param (#6179) | Andrew Morgan | 2019-10-08 | 1 | -12/+1 |
| | | | | | | * Remove unused public room list timeout param * Add changelog | ||||
* | Fix public room list pagination. | Erik Johnston | 2019-10-02 | 1 | -10/+23 |
| | | | | | | We incorrectly used `room_id` as to bound the result set, even though we order by `joined_members, room_id`, leading to incorrect results after pagination. | ||||
* | Land improved room list based on room stats (#6019) | Erik Johnston | 2019-10-02 | 1 | -234/+89 |
| | | | | Use room_stats and room_state for room directory search | ||||
* | Support MSC2197 outbound with unstable prefix | Olivier Wilkinson (reivilibre) | 2019-08-15 | 1 | -1/+28 |
| | | | | Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net> | ||||
* | Replace returnValue with return (#5736) | Amber Brown | 2019-07-23 | 1 | -5/+5 |
| | |||||
* | Run Black. (#5482) | Amber Brown | 2019-06-20 | 1 | -102/+152 |
| | |||||
* | Fix grammar and document get_current_users_in_room (#4998) | Andrew Morgan | 2019-04-03 | 1 | -1/+1 |
| | |||||
* | Pull out config option | Erik Johnston | 2019-03-20 | 1 | -3/+3 |
| | |||||
* | Return before we log | Erik Johnston | 2019-03-20 | 1 | -4/+5 |
| | |||||
* | Add option to disable search room lists | Erik Johnston | 2019-03-19 | 1 | -0/+13 |
| | | | | This disables both local and remote room list searching. | ||||
* | Merge branch 'develop' of github.com:matrix-org/synapse into ↵ | Andrew Morgan | 2019-02-26 | 1 | -2/+26 |
|\ | | | | | | | anoa/public_rooms_federate_develop | ||||
| * | Revert "Prevent showing non-fed rooms in fed /publicRooms" | Andrew Morgan | 2019-02-26 | 1 | -65/+11 |
| | | |||||
| * | Cleaner chunk logic | Andrew Morgan | 2019-02-26 | 1 | -5/+4 |
| | | |||||
| * | Correct indent | Andrew Morgan | 2019-02-26 | 1 | -3/+3 |
| | | |||||
| * | Correct docstring types and chunk logic | Andrew Morgan | 2019-02-26 | 1 | -10/+11 |
| | | |||||
| * | Clean up room chunk logic | Andrew Morgan | 2019-02-26 | 1 | -6/+8 |
| | | |||||
| * | Make not showing non-federated rooms the default | Andrew Morgan | 2019-02-26 | 1 | -1/+1 |
| | | |||||
| * | Result may be None | Andrew Morgan | 2019-02-26 | 1 | -1/+1 |
| | | |||||
| * | Address rich comments | Andrew Morgan | 2019-02-26 | 1 | -6/+30 |
| | | |||||
| * | elif not else if | Andrew Morgan | 2019-02-25 | 1 | -1/+1 |
| | | |||||
| * | syntax derp | Andrew Morgan | 2019-02-25 | 1 | -1/+1 |
| | | |||||
| * | Simplify call to generate_room_entry | Andrew Morgan | 2019-02-25 | 1 | -17/+13 |
| | | |||||
| * | Merge branch 'develop' of github.com:matrix-org/synapse into ↵ | Erik Johnston | 2019-02-25 | 1 | -2/+11 |
| |\ | | | | | | | | | | anoa/public_rooms_federate | ||||
| | * | Change default timeout value from 0 to None | Andrew Morgan | 2019-01-24 | 1 | -1/+1 |
| | | | |||||
| | * | Use self.clock instead of datetime | Andrew Morgan | 2019-01-24 | 1 | -4/+3 |
| | | | |||||
| | * | isort | Andrew Morgan | 2019-01-24 | 1 | -1/+1 |
| | | | |||||
| | * | lint | Andrew Morgan | 2019-01-24 | 1 | -1/+2 |
| | | | |||||
| | * | Time out filtered room dir queries after 60s | Andrew Morgan | 2019-01-24 | 1 | -2/+12 |
| | | | |||||
| * | | Docs and arg name clarification | Andrew Morgan | 2019-02-25 | 1 | -2/+15 |
| | | | |||||
| * | | Don't restrict non-fed rooms over client APIs | Andrew Morgan | 2019-02-25 | 1 | -11/+18 |
| | | | |||||
| * | | Config option to prevent showing non-fed rooms in fed /publicRooms | Andrew Morgan | 2019-02-25 | 1 | -2/+15 |
| |/ | |||||
* | | Put function def back to the way it was | Andrew Morgan | 2019-02-26 | 1 | -3/+3 |
| | | |||||
* | | Prevent showing non-fed rooms in fed /publicRooms | Andrew Morgan | 2019-02-26 | 1 | -12/+50 |
|/ | |||||
* | Fix roomlist since tokens on Python 3 (#4046) | Will Hunt | 2018-10-17 | 1 | -2/+9 |
| | | | Thanks @Half-Shot !!! | ||||
* | Port handlers/ to Python 3 (#3803) | Amber Brown | 2018-09-07 | 1 | -1/+1 |
| | |||||
* | Rename async to async_helpers because `async` is a keyword on Python 3.7 (#3678) | Amber Brown | 2018-08-10 | 1 | -1/+1 |
| | |||||
* | typo | Matthew Hodgson | 2018-07-13 | 1 | -3/+3 |
| | |||||
* | run isort | Amber Brown | 2018-07-09 | 1 | -11/+9 |
| | |||||
* | Consistently use six's iteritems and wrap lazy keys/values in list() if ↵ | Amber Brown | 2018-05-31 | 1 | -1/+2 |
| | | | | they're not meant to be lazy (#3307) | ||||
* | Move more xrange to six | Adrian Tschira | 2018-04-28 | 1 | -1/+3 |
| | | | | | | plus a bonus next() Signed-off-by: Adrian Tschira <nota@notafile.com> | ||||
* | Refactor ResponseCache usage | Richard van der Hoff | 2018-04-12 | 1 | -25/+13 |
| | | | | | | | | | | | | | | | Adds a `.wrap` method to ResponseCache which wraps up the boilerplate of a (get, set) pair, and then use it throughout the codebase. This will be largely non-functional, but does include the following functional changes: * federation_server.on_context_state_request: drops use of _server_linearizer which looked redundant and could cause incorrect cache misses by yielding between the get and the set. * RoomListHandler.get_remote_public_room_list(): fixes logcontext leaks * the wrap function includes some logging. I'm hoping this won't be too noisy on production. | ||||
* | Add metrics for ResponseCache | Richard van der Hoff | 2018-04-10 | 1 | -2/+3 |
| | |||||
* | s/replication_client/federation_client/ | Erik Johnston | 2018-03-13 | 1 | -1/+1 |
| | |||||
* | Split replication layer into two | Erik Johnston | 2018-03-13 | 1 | -1/+1 |
| | |||||
* | add white space line | Neil Johnson | 2018-01-26 | 1 | -0/+1 |
| | |||||
* | rather than try reconstruct the results object, better to guard against the ↵ | Neil Johnson | 2018-01-26 | 1 | -6/+2 |
| | | | | xrange step argument being 0 | ||||
* | fix return type, should be a dict | Neil Johnson | 2018-01-25 | 1 | -1/+1 |
| | |||||
* | fix PEP8 violation | Neil Johnson | 2018-01-25 | 1 | -1/+1 |
| | |||||
* | remove white space | Neil Johnson | 2018-01-25 | 1 | -1/+0 |
| | |||||
* | synapse 500s on a call to publicRooms in the case where the number of public ↵ | Neil Johnson | 2018-01-25 | 1 | -0/+5 |
| | | | | rooms is zero, the specific cause is due to xrange trying to use a step value of zero, but if the total room number really is zero then it makes sense to just bail and save the extra processing | ||||
* | Reshuffle room list request code | Richard van der Hoff | 2017-11-14 | 1 | -27/+24 |
| | | | | | | I'm not entirely sure if this will actually help anything, but it simplifies the code and might give further clues about why room list search requests are blowing out the get_current_state_ids caches. | ||||
* | Add a load of logging to the room_list handler | Richard van der Hoff | 2017-11-14 | 1 | -0/+13 |
| | | | | So we can see what it gets up to. | ||||
* | Update room_list.py | Erik Johnston | 2017-10-26 | 1 | -1/+1 |
| | |||||
* | Do logcontexts outside ResponseCache | Erik Johnston | 2017-10-25 | 1 | -2/+5 |
| | |||||
* | Add logging and fix log contexts for publicRooms | Erik Johnston | 2017-10-25 | 1 | -0/+2 |
| | |||||
* | Initial group server implementation | Erik Johnston | 2017-07-10 | 1 | -8/+10 |
| | |||||
* | Comments | Erik Johnston | 2017-03-13 | 1 | -0/+12 |
| | |||||
* | Assume rooms likely haven't changed | Erik Johnston | 2017-03-13 | 1 | -8/+11 |
| | |||||
* | Get current state by using current_state_events table | Erik Johnston | 2017-03-10 | 1 | -18/+29 |
| | |||||
* | Cache network room list queries. | Erik Johnston | 2016-12-16 | 1 | -3/+4 |
| | |||||
* | Fix caching on public room list | Erik Johnston | 2016-12-13 | 1 | -2/+4 |
| | |||||
* | Comments | Erik Johnston | 2016-12-07 | 1 | -1/+2 |
| | |||||
* | Add new API appservice specific public room list | Erik Johnston | 2016-12-06 | 1 | -11/+46 |
| | |||||
* | Add total_room_count_estimate to /publicRooms | Erik Johnston | 2016-09-21 | 1 | -0/+3 |
| | |||||
* | Merge pull request #1130 from matrix-org/erikj/fix_pubroom_pag | Erik Johnston | 2016-09-19 | 1 | -12/+25 |
|\ | | | | | Handle fact that _generate_room_entry may not return a room entry | ||||
| * | PEP8 | Erik Johnston | 2016-09-17 | 1 | -1/+1 |
| | | |||||
| * | Handle fact that _generate_room_entry may not return a room entry | Erik Johnston | 2016-09-17 | 1 | -12/+25 |
| | | |||||
* | | Merge pull request #1129 from matrix-org/erikj/fix_pubroom_pag | Erik Johnston | 2016-09-17 | 1 | -110/+123 |
|\| | | | | | Fix and clean up publicRooms pagination | ||||
| * | Spelling | Erik Johnston | 2016-09-17 | 1 | -1/+1 |
| | | |||||
| * | Fix and clean up publicRooms pagination | Erik Johnston | 2016-09-17 | 1 | -110/+123 |
| | | |||||
* | | Make public room search case insensitive | David Baker | 2016-09-16 | 1 | -4/+4 |
|/ | |||||
* | Comment | Erik Johnston | 2016-09-16 | 1 | -0/+2 |
| | |||||
* | Add remote reoom cache | Erik Johnston | 2016-09-16 | 1 | -2/+23 |
| | |||||
* | Support filtering remote room lists | Erik Johnston | 2016-09-16 | 1 | -3/+9 |
| | |||||
* | Filter remote rooms lists locally | Erik Johnston | 2016-09-16 | 1 | -10/+24 |
| | |||||
* | Don't cache searched in /publicRooms | Erik Johnston | 2016-09-16 | 1 | -1/+5 |
| | |||||
* | Add very basic filter API to /publicRooms | Erik Johnston | 2016-09-15 | 1 | -5/+18 |
| | |||||
* | Change the way we calculate new_limit in /publicRooms and add POST API | Erik Johnston | 2016-09-15 | 1 | -15/+33 |
| | |||||
* | Base public room list off of public_rooms stream | Erik Johnston | 2016-09-15 | 1 | -7/+27 |
| | |||||
* | Pass since/from parameters over federation | Erik Johnston | 2016-09-15 | 1 | -29/+26 |
| | |||||
* | Allow paginating both forwards and backwards | Erik Johnston | 2016-09-15 | 1 | -21/+50 |
| | |||||
* | Remove support for aggregate room lists | Erik Johnston | 2016-09-15 | 1 | -55/+0 |
| | |||||
* | Accept optional token to public room list | Erik Johnston | 2016-09-15 | 1 | -7/+75 |
| | |||||
* | Calculate the public room list from a stream_ordering | Erik Johnston | 2016-09-14 | 1 | -3/+40 |
| | |||||
* | Refactor public rooms to not pull out the full state for each room | Erik Johnston | 2016-09-14 | 1 | -14/+30 |
| | |||||
* | Move RoomListHandler into a separate file | Erik Johnston | 2016-09-14 | 1 | -0/+184 |