Jason Robinson
060e7dce09
Allow RedirectResponse in SAML response handler
...
Allow custom SAML handlers to redirect after processing an auth response.
Fixes #7149
Signed-off-by: Jason Robinson <jasonr@matrix.org>
2020-03-26 19:02:35 +02:00
Patrick Cloke
1c1242acba
Validate that the session is not modified during UI-Auth ( #7068 )
2020-03-26 07:39:34 -04:00
Richard van der Hoff
39230d2171
Clean up some LoggingContext stuff ( #7120 )
...
* Pull Sentinel out of LoggingContext
... and drop a few unnecessary references to it
* Factor out LoggingContext.current_context
move `current_context` and `set_context` out to top-level functions.
Mostly this means that I can more easily trace what's actually referring to
LoggingContext, but I think it's generally neater.
* move copy-to-parent into `stop`
this really just makes `start` and `stop` more symetric. It also means that it
behaves correctly if you manually `set_log_context` rather than using the
context manager.
* Replace `LoggingContext.alive` with `finished`
Turn `alive` into `finished` and make it a bit better defined.
2020-03-24 14:45:33 +00:00
Patrick Cloke
190ab593b7
Use the proper error code when a canonical alias that does not exist is used. ( #7109 )
2020-03-23 15:21:54 -04:00
Erik Johnston
fdb1344716
Remove concept of a non-limited stream. ( #7011 )
2020-03-20 14:40:47 +00:00
Patrick Cloke
88b41986db
Add an option to the set password API to choose whether to logout other devices. ( #7085 )
2020-03-18 07:50:00 -04:00
Patrick Cloke
60724c46b7
Remove special casing of m.room.aliases
events ( #7034 )
2020-03-17 07:37:04 -04:00
Richard van der Hoff
6a35046363
Revert "Add options to disable setting profile info for prevent changes. ( #7053 )"
...
This reverts commit 54dd28621b
, reversing
changes made to 6640460d05
.
2020-03-17 11:25:01 +00:00
Brendan Abolivier
beb19cf61a
Fix buggy condition in account validity handler ( #7074 )
2020-03-16 12:16:30 +00:00
Patrick Cloke
77d0a4507b
Add type annotations and comments to auth handler ( #7063 )
2020-03-12 11:36:27 -04:00
Brendan Abolivier
69ce55c510
Don't filter out dummy events when we're checking the visibility of state
2020-03-11 17:52:54 +00:00
Brendan Abolivier
54dd28621b
Add options to disable setting profile info for prevent changes. ( #7053 )
2020-03-10 22:23:01 +00:00
Brendan Abolivier
6b0efe73e2
SAML2: render a comprehensible error page if something goes wrong
...
If an error happened while processing a SAML AuthN response, or a client
ends up doing a `GET` request to `/authn_response`, then render a
customisable error page rather than a confusing error.
2020-03-10 13:59:22 +00:00
dklimpel
39f6595b4a
lint, fix tests
2020-03-09 22:13:20 +01:00
dklimpel
885134529f
updates after review
2020-03-09 22:09:29 +01:00
dklimpel
ce460dc31c
lint
2020-03-08 15:22:43 +01:00
dklimpel
fb078f921b
changelog
2020-03-08 15:19:07 +01:00
dklimpel
1f5f3ae8b1
Add options to disable setting profile info for prevent changes.
2020-03-08 14:49:33 +01:00
Brendan Abolivier
54b78a0e3b
Lint
2020-03-06 15:11:13 +00:00
Brendan Abolivier
297aaf4816
Mention the session ID in the error message
2020-03-06 15:07:41 +00:00
Brendan Abolivier
45df9d35a9
Lint
2020-03-06 11:10:52 +00:00
Brendan Abolivier
80e580ae92
Make sure that is_verified is a boolean when processing room keys
2020-03-06 11:05:00 +00:00
Patrick Cloke
13892776ef
Allow deleting an alias if the user has sufficient power level ( #6986 )
2020-03-04 11:30:46 -05:00
Brendan Abolivier
43f874055d
Merge branch 'master' into develop
2020-03-03 15:20:49 +00:00
Patrick Cloke
7dcbc33a1b
Validate the alt_aliases property of canonical alias events ( #6971 )
2020-03-03 07:12:45 -05:00
Brendan Abolivier
a0178df104
Fix wrong handler being used in SAML handler
2020-03-03 11:29:07 +00:00
Brendan Abolivier
65c73cdfec
Factor out complete_sso_login and expose it to the Module API
2020-03-03 10:54:44 +00:00
Richard van der Hoff
3e99528f2b
Store room version on invite ( #6983 )
...
When we get an invite over federation, store the room version in the rooms table.
The general idea here is that, when we pull the invite out again, we'll want to know what room_version it belongs to (so that we can later redact it if need be). So we need to store it somewhere...
2020-02-26 16:58:33 +00:00
Erik Johnston
1f773eec91
Port PresenceHandler to async/await ( #6991 )
2020-02-26 15:33:26 +00:00
Richard van der Hoff
691659568f
Remove redundant store_room call ( #6979 )
...
`_process_received_pdu` is only called by `on_receive_pdu`, which ignores any
events for unknown rooms, so this is redundant.
2020-02-24 17:20:44 +00:00
Richard van der Hoff
a301934f46
Upsert room version when we join over federation ( #6968 )
...
This is intended as a precursor to storing room versions when we receive an
invite over federation, but has the happy side-effect of fixing #3374 at last.
In short: change the store_room with try/except to a proper upsert which
updates the right columns.
2020-02-24 15:46:41 +00:00
Dirk Klimpel
7b0e2d961c
Change displayname of user as admin in rooms ( #6876 )
2020-02-21 17:44:03 +00:00
Patrick Cloke
fcf4599488
Stop returning aliases as part of the room list. ( #6970 )
2020-02-21 12:40:23 -05:00
Patrick Cloke
509e381afa
Clarify list/set/dict/tuple comprehensions and enforce via flake8 ( #6957 )
...
Ensure good comprehension hygiene using flake8-comprehensions.
2020-02-21 07:15:07 -05:00
Richard van der Hoff
4f7e4fc2fb
Merge branch 'master' into develop
2020-02-21 09:37:03 +00:00
Andrew Morgan
8f6d9c4cf0
Small grammar fixes to the ACME v1 deprecation notice ( #6944 )
...
Some small fixes to the copy in #6907 .
2020-02-21 08:53:01 +00:00
Patrick Cloke
99eed85a77
Do not send alias events when creating / upgrading a room ( #6941 )
...
Stop emitting room alias update events during room creation/upgrade.
2020-02-20 16:24:04 -05:00
Richard van der Hoff
2fb7794e60
Merge pull request #6949 from matrix-org/rav/list_room_aliases_peekable
...
Make room alias lists peekable
2020-02-19 11:19:11 +00:00
Brendan Abolivier
5e4a438556
Merge pull request #6945 from matrix-org/babolivier/fix-retention-debug-log
...
Fix log in message retention purge jobs
2020-02-19 10:12:55 +00:00
Richard van der Hoff
709e81f518
Make room alias lists peekable
...
As per
https://github.com/matrix-org/matrix-doc/pull/2432#pullrequestreview-360566830 ,
make room alias lists accessible to users outside world_readable rooms.
2020-02-19 08:53:32 +00:00
Richard van der Hoff
a0a1fd0bec
Add allow_departed_users
param to check_in_room_or_world_readable
...
... and set it everywhere it's called.
while we're here, rename it for consistency with `check_user_in_room` (and to
help check that I haven't missed any instances)
2020-02-19 08:52:51 +00:00
Richard van der Hoff
b58d17e44f
Refactor the membership check methods in Auth
...
these were getting a bit unwieldy, so let's combine `check_joined_room` and
`check_user_was_in_room` into a single `check_user_in_room`.
2020-02-18 23:21:44 +00:00
Brendan Abolivier
f31a94a6dd
Fix log in message retention purge jobs
2020-02-18 17:29:57 +00:00
Richard van der Hoff
adfaea8c69
Implement GET /_matrix/client/r0/rooms/{roomId}/aliases ( #6939 )
...
per matrix-org/matrix-doc#2432
2020-02-18 16:23:25 +00:00
Brendan Abolivier
d484126bf7
Merge pull request #6907 from matrix-org/babolivier/acme-config
...
Add mention and warning about ACME v1 deprecation to the TLS config
2020-02-18 16:11:31 +00:00
Brendan Abolivier
9801a042f3
Make the log more noticeable
2020-02-18 15:15:43 +00:00
Brendan Abolivier
bfbe2f5b08
Print the error as an error log and raise the same exception we got
2020-02-18 15:10:41 +00:00
Patrick Cloke
fe3941f6e3
Stop sending events when creating or deleting aliases ( #6904 )
...
Stop sending events when creating or deleting associations (room aliases). Send an updated canonical alias event if one of the alt_aliases is deleted.
2020-02-18 07:29:44 -05:00
Andrew Morgan
3404ad289b
Raise the default power levels for invites, tombstones and server acls ( #6834 )
2020-02-17 13:23:37 +00:00
Patrick Cloke
49f877d32e
Filter the results of user directory searching via the spam checker ( #6888 )
...
Add a method to the spam checker to filter the user directory results.
2020-02-14 07:17:54 -05:00