- Jul 11, 2019
-
-
Andrew Morgan authored
-
Richard van der Hoff authored
First of all, let's get rid of `TOKEN_NOT_FOUND_HTTP_STATUS`. It was a hack we did at one point when it was possible to return either a 403 or a 401 if the creds were missing. We always return a 401 in these cases now (thankfully), so it's not needed. Let's also stop abusing `AuthError` for these cases. Honestly they have nothing that relates them to the other places that `AuthError` is used, other than the fact that they are loosely under the 'Auth' banner. It makes no sense for them to share exception classes. Instead, let's add a couple of new exception classes: `InvalidClientTokenError` and `MissingClientTokenError`, for the `M_UNKNOWN_TOKEN` and `M_MISSING_TOKEN` cases respectively - and an `InvalidClientCredentialsError` base class for the two of them.
-
Jorik Schellekens authored
* Configure and initialise tracer Includes config options for the tracer and sets up JaegerClient. * Scope manager using LogContexts We piggy-back our tracer scopes by using log context. The current log context gives us the current scope. If new scope is created we create a stack of scopes in the context. * jaeger is a dependency now * Carrier inject and extraction for Twisted Headers * Trace federation requests on the way in and out. The span is created in _started_processing and closed in _finished_processing because we need a meaningful log context. * Create logcontext for new scope. Instead of having a stack of scopes in a logcontext we create a new context for a new scope if the current logcontext already has a scope. * Remove scope from logcontext if logcontext is top level * Disable tracer if not configured * typo * Remove dependence on jaeger internals * bools * Set service name * :Explicitely state that the tracer is disabled * Black is the new black * Newsfile * Code style * Use the new config setup. * Generate config. * Copyright * Rename config to opentracing * Remove user whitelisting * Empty whitelist by default * User ConfigError instead of RuntimeError * Use isinstance * Use tag constants for opentracing. * Remove debug comment and no need to explicitely record error * Two errors a "s(c)entry" * Docstrings! * Remove debugging brainslip * Homeserver Whitlisting * Better opentracing config comment * linting * Inclue worker name in service_name * Make opentracing an optional dependency * Neater config retreival * Clean up dummy tags * Instantiate tracing as object instead of global class * Inlcude opentracing as a homeserver member. * Thread opentracing to the request level * Reference opetnracing through hs * Instantiate dummy opentracin g for tests. * About to revert, just keeping the unfinished changes just in case * Revert back to global state, commit number: 9ce4a3d9067bf9889b86c360c05ac88618b85c4f * Use class level methods in tracerutils * Start and stop requests spans in a place where we have access to the authenticated entity * Seen it, isort it * Make sure to close the active span. * I'm getting black and blue from this. * Logger formatting Co-Authored-By:
Erik Johnston <erik@matrix.org> * Outdated comment * Import opentracing at the top * Return a contextmanager * Start tracing client requests from the servlet * Return noop context manager if not tracing * Explicitely say that these are federation requests * Include servlet name in client requests * Use context manager * Move opentracing to logging/ * Seen it, isort it again! * Ignore twisted return exceptions on context exit * Escape the scope * Scopes should be entered to make them useful. * Nicer decorator names * Just one init, init? * Don't need to close something that isn't open * Docs make you smarter
-
- Jul 10, 2019
-
-
Richard van der Hoff authored
this is only used in one place, so it's clearer if we inline it and reduce the API surface. Also, fixes a buglet where we would create an access token even if we were about to block the user (we would never return the AT, so the user could never use it, but it was still created and added to the db.)
-
Brendan Abolivier authored
Send 3PID bind requests as JSON data
-
Richard van der Hoff authored
The 'token' param is no longer used anywhere except the tests, so let's kill that off too.
-
Brendan Abolivier authored
-
Brendan Abolivier authored
-
Brendan Abolivier authored
-
Andrew Morgan authored
A fix for PR #5626, which returned the original event content as part of a call to /relations. Only problem was that we were attempting to aggregate the relations on top of it when we did so. We now set bundle_aggregations to False in the get_event call. We also do this when pulling the relation events as well, because edits of edits are not something we'd like to support here.
-
Andrew Morgan authored
Add a dev script to cover all the different linting steps.
-
Bruno Windels authored
-
- Jul 09, 2019
-
-
Brendan Abolivier authored
Use JSON when querying the IS's /store-invite endpoint
-
Hubert Chathi authored
FederationDeniedError is a subclass of SynapseError, which is a subclass of CodeMessageException, so if e is a FederationDeniedError, then this check for FederationDeniedError will never be reached since it will be caught by the check for CodeMessageException above. The check for CodeMessageException does almost the same thing as this check (since FederationDeniedError initialises with code=403 and msg="Federation denied with %s."), so may as well just keep allowing it to handle this case.
-
Andrew Morgan authored
When asking for the relations of an event, include the original event in the response. This will mostly be used for efficiently showing edit history, but could be useful in other circumstances.
-
Brendan Abolivier authored
Allow newly-registered users to lookup their own profiles
-
- Jul 08, 2019
-
-
Richard van der Hoff authored
Nothing uses this now, so we can remove the dead code, and clean up the API. Since we're changing the shape of the return value anyway, we take the opportunity to give the method a better name.
-
Brendan Abolivier authored
-
Brendan Abolivier authored
-
Brendan Abolivier authored
-
Brendan Abolivier authored
When a user creates an account and the 'require_auth_for_profile_requests' config flag is set, and a client that performed the registration wants to lookup the newly-created profile, the request will be denied because the user doesn't share a room with themselves yet.
-
Richard van der Hoff authored
It was pretty unclear what was going on, so I've added a couple of log lines.
-
Brendan Abolivier authored
-
Brendan Abolivier authored
-
Richard van der Hoff authored
* Update ModuleApi to avoid register(generate_token=True) This is the only place this is still used, so I'm trying to kill it off. * changelog
-
Richard van der Hoff authored
* Factor out some redundant code in the login impl Also fixes a redundant access_token which was generated during jwt login. * changelog
-
Richard van der Hoff authored
This is only used in tests, so...
-
Brendan Abolivier authored
-
Brendan Abolivier authored
-
Andrew Morgan authored
* Add a few more common environment directory names to black exclusion * Add changelog
-
- Jul 05, 2019
-
-
J. Ryan Stinnett authored
This adds a default push rule following the proposal in [MSC2153](https://github.com/matrix-org/matrix-doc/pull/2153). See also https://github.com/vector-im/riot-web/issues/10208 See also https://github.com/matrix-org/matrix-js-sdk/pull/976
-
Andrew Morgan authored
Riot team would like some extra fields as part of m.replace, so here you go. Fixes: #5598
-
Richard van der Hoff authored
This has never been documented, and I'm not sure it's ever been used outside sytest. It's quite a lot of poorly-maintained code, so I'd like to get rid of it. For now I haven't removed the database table; I suggest we leave that for a future clearout.
-
Richard van der Hoff authored
this hasn't done anything for years
-
Richard van der Hoff authored
- Put the default window_size back to 1000ms (broken by #5181) - Make the `rc_federation` config actually do something - fix an off-by-one error in the 'concurrent' limit - Avoid creating an unused `_PerHostRatelimiter` object for every single incoming request
-
Andrew Morgan authored
The runtime errors that dealt with local email password resets talked about config options that users may not even have in their config file yet (if upgrading). Instead, the cryptic errors are now replaced with hopefully much more helpful ones.
-
- Jul 04, 2019
-
-
Amber Brown authored
* Improve the backwards compatibility re-exports of synapse.logging.context. * reexport logformatter too
-
Andrew Morgan authored
* Add a sytest blacklist file * Add changelog * Add blacklist to manifest
-
Erik Johnston authored
-