Commit graph

15150 commits

Author SHA1 Message Date
Erik Johnston 5b0e9948ea Do the update as a background index 2019-10-17 16:31:42 +01:00
Erik Johnston a2bb50c2eb Merge pull request #6185 from matrix-org/erikj/fix_censored_evnets
Fix inserting bytes as text in `censor_redactions`
2019-10-17 16:29:07 +01:00
Andrew Morgan ecb69d824a 1.4.0 2019-10-03 13:22:44 +01:00
Andrew Morgan 0f46bf5737
Replace client_secret with <redacted> in server logs (#6158)
Replace `client_secret` query parameter values with `<redacted>` in the logs. Prevents a scenario where a MITM of server traffic can horde 3pids on their account.
2019-10-03 12:57:26 +01:00
Andrew Morgan aec1377d0b 1.4.0rc2 2019-10-02 13:55:00 +01:00
Erik Johnston b4fe7e19c0
Merge pull request #6146 from matrix-org/erikj/fix_destination_retry_timings
Fix errors storing large retry intervals.
2019-10-02 11:05:22 +01:00
Erik Johnston 35f392bb29
Merge pull request #6145 from matrix-org/erikj/fix_censored_redactions
Fix fetching censored redactions from DB
2019-10-02 10:57:30 +01:00
Erik Johnston 2bc027ab71 Newsfile 2019-10-02 10:41:29 +01:00
Erik Johnston f44f1d2e83 Fix errors storing large retry intervals.
We have set the max retry interval to a value larger than a postgres or
sqlite int can hold, which caused exceptions when updating the
destinations table.

To fix postgres we need to change the column to a bigint, and for sqlite
we lower the max interval to 2**62 (which is still incredibly long).
2019-10-02 10:36:27 +01:00
Erik Johnston dfe7009639
Merge pull request #6141 from matrix-org/erikj/censor_redactions_fix
Fix censoring redactions performance
2019-10-02 10:20:35 +01:00
Erik Johnston 33d4ebdf78 Newsfile 2019-10-02 10:18:17 +01:00
Erik Johnston ce7a3e7e27 Fix fetching censored redactions from DB
Fetching a censored redactions caused an exception due to the code
expecting redactions to have a `redact` key, which redacted redactions
don't have.
2019-10-02 10:14:01 +01:00
Erik Johnston 2b8352e638 Newsfile 2019-10-01 13:47:06 +01:00
Erik Johnston 5e8387af9e Use received_ts to find uncensored redacted events
Joining against `events` and ordering by `stream_ordering` is
inefficient as it forced scanning the entirety of the redactions table.

This isn't the case if we use `redactions.received_ts` column as we can
then use an index.
2019-10-01 13:43:48 +01:00
Erik Johnston 898dde981b Add received_ts column to redactions.
This will allow us to efficiently search for uncensored redactions in
the DB before a given time.
2019-10-01 13:43:48 +01:00
Erik Johnston a27fb7d5ca Don't repeatedly attempt to censor events we don't have.
Currently we don't set `have_censored` column if we don't have the
target event of a redaction, which means we repeatedly attempt to censor
the same non-existant event.

When we persist non-redacted events we unset the `have_censored` column
for any redactions that target said event.
2019-10-01 11:05:48 +01:00
Erik Johnston 479fbac96f
Merge pull request #6135 from matrix-org/erikj/fixup_devices_last_seen_query
Fix `devices_last_seen` background update.
2019-10-01 10:16:57 +01:00
Erik Johnston 129343cd8a Newsfile 2019-09-30 12:00:34 +01:00
Erik Johnston 9267741a5f Fix devices_last_seen background update.
Fixes #6134.
2019-09-30 11:58:36 +01:00
Erik Johnston 6d0f559fb3
Merge pull request #6117 from matrix-org/erikj/fix_sample_config
Fix 'redaction_retention_period' sampel config to match guidelines
2019-09-26 17:14:23 +01:00
Erik Johnston 9d99eade7c Newsfile 2019-09-26 16:46:21 +01:00
Erik Johnston 3423633d50 Fix 'redaction_retention_period' sampel config to match guidelines 2019-09-26 16:43:52 +01:00
Neil Johnson f25c5ee1fe
s/month/week/ to match config 2019-09-26 15:57:02 +01:00
Richard van der Hoff e755128006
Update CHANGES.md
formatting tweak
2019-09-26 15:29:31 +01:00
Richard van der Hoff e04c235907 more changelog updates 2019-09-26 14:59:01 +01:00
Richard van der Hoff 5384c43626 Changelog formatting 2019-09-26 13:39:09 +01:00
Richard van der Hoff 3fbca80a8d changelog 2019-09-26 13:23:48 +01:00
Neil Johnson 8b8f8c7b3c Explicitly log when a homeserver does not have a trusted key server configured (#6090) 2019-09-26 12:57:01 +01:00
Richard van der Hoff 1b051f1245 Merge commit '1b23f991a' into release-v1.4.0 2019-09-26 12:35:26 +01:00
Neil Johnson 1b23f991ab
Clarify upgrade notes ahead of 1.4.0 release 2019-09-26 12:30:10 +01:00
Richard van der Hoff 2927c6bc4c bump version 2019-09-26 12:29:59 +01:00
Neil Johnson 034db2ba21 Fix dummy event insertion consent bug (#6053)
Fixes #5905
2019-09-26 11:47:53 +01:00
Erik Johnston d64b70ada2
Merge pull request #6098 from matrix-org/erikj/cleanup_user_ips_2
Prune old rows in user_ips tables.
2019-09-26 10:23:54 +01:00
Richard van der Hoff a96318127d Update comments and docstring 2019-09-25 18:17:39 +01:00
Erik Johnston 4fb3c129aa Merge branch 'develop' of github.com:matrix-org/synapse into erikj/cleanup_user_ips_2 2019-09-25 17:53:13 +01:00
Erik Johnston 9614d3c9d1
Merge pull request #6089 from matrix-org/erikj/cleanup_user_ips
Move last seen info into devices table
2019-09-25 17:42:39 +01:00
Neil Johnson a4f3ca48b5 Enable cleaning up extremities with dummy events by default to prevent undue build up of forward extremities. (#5884) 2019-09-25 17:27:35 +01:00
Erik Johnston 39b50ad42a Review comments 2019-09-25 17:22:33 +01:00
Erik Johnston d2bd0bc6b1 Merge branch 'develop' of github.com:matrix-org/synapse into erikj/cleanup_user_ips 2019-09-25 17:16:28 +01:00
Erik Johnston 50572db837
Use if is not None
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2019-09-25 17:00:23 +01:00
Neil Johnson 77dc7093a7 Threepid validity checks on msisdns should not be dependent on 'threepid_behaviour_email'. (#6104)
Fixes #6103
2019-09-25 12:29:35 +01:00
Richard van der Hoff 990928abde
Stop advertising unsupported flows for registration (#6107)
If email or msisdn verification aren't supported, let's stop advertising them
for registration.

Fixes #6100.
2019-09-25 12:10:26 +01:00
Richard van der Hoff 2cd98812ba
Refactor the user-interactive auth handling (#6105)
Pull the checkers out to their own classes, rather than having them lost in a
massive 1000-line class which does everything.

This is also preparation for some more intelligent advertising of flows, as per #6100
2019-09-25 11:33:03 +01:00
Richard van der Hoff 8004d6ca2f
Refactor code for calculating registration flows (#6106)
because, frankly, it looked like it was written by an axe-murderer.

This should be a non-functional change, except that where `m.login.dummy` was
previously advertised *before* `m.login.terms`, it will now be advertised
afterwards. AFAICT that should have no effect, and will be more consistent with
the flows that involve passing a 3pid.
2019-09-25 11:32:05 +01:00
Brendan Abolivier f99a9c9cb0
Merge pull request #6092 from matrix-org/babolivier/background_update_deactivated_return
Fix the return value in the users_set_deactivated_flag background job
2019-09-24 17:11:12 +01:00
Richard van der Hoff 4f6bbe9d0d
Merge pull request #6037 from matrix-org/rav/saml_mapping_work
Update the process for mapping SAML2 users to matrix IDs
2019-09-24 17:04:54 +01:00
Richard van der Hoff 9b7c4f4078 Merge remote-tracking branch 'origin/develop' into rav/saml_mapping_work 2019-09-24 17:03:50 +01:00
Richard van der Hoff 566ac40939
remove unused parameter to get_user_id_by_threepid (#6099)
Added in #5377, apparently in error
2019-09-24 17:01:09 +01:00
Erik Johnston f8b02c5420 Newsfile 2019-09-24 15:59:43 +01:00
Erik Johnston faac453f08 Test that pruning of old user IPs works 2019-09-24 15:53:17 +01:00