This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Implement rechecking of redactions for room versions v3#4499
Merged
Conversation
a909470 to
2fbd985
Compare
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
2fbd985 to
7709d2b
Compare
Codecov Report
@@ Coverage Diff @@
## develop #4499 +/- ##
===========================================
- Coverage 74.71% 74.67% -0.04%
===========================================
Files 336 336
Lines 34258 34280 +22
Branches 5578 5585 +7
===========================================
+ Hits 25595 25599 +4
- Misses 7081 7099 +18
Partials 1582 1582 |
richvdh
reviewed
Jan 29, 2019
richvdh
suggested changes
Jan 29, 2019
Member
richvdh
left a comment
There was a problem hiding this comment.
erm: do we not need to check that the sender of a redaction matches the original sender when we pull the original event out of the database?
| redacter_domain = get_domain_from_id(event.event_id) | ||
| redactee_domain = get_domain_from_id(event.redacts) | ||
| if redacter_domain == redactee_domain: | ||
| if room_version in (RoomVersions.V1, RoomVersions.V2, RoomVersions.VDH_TEST): |
| """ | ||
| return getattr(self, "send_on_behalf_of", None) | ||
|
|
||
| def need_to_check_redaction(self): |
Member
There was a problem hiding this comment.
can has docstring please - what does this mean?
Co-Authored-By: erikjohnston <erikj@jki.re>
Member
Author
Argh, bollocks |
erikjohnston
commented
Jan 29, 2019
Member
Author
|
sytest looks to be unhappy that i killed off VDH_TEST |
richvdh
approved these changes
Jan 29, 2019
Member
There was a problem hiding this comment.
"is allowed to redact any event"
turt2live
added a commit
to matrix-org/matrix-spec-proposals
that referenced
this pull request
Jan 31, 2019
Original proposal: #1659 Implementation proofs (some traversing of the PR tree may be required to get all of them): * matrix-org/synapse#4483 * matrix-org/synapse#4499 This doesn't intentionally change anything from the proposal. **Implementation details**: The simple part of this is the introduction of a rooms/v3.html document. The somewhat unclear part is the stuff done to the s2s definitions. This pulls `unsigned_pdu` out to `unsigned_pdu_base` (all fields except `event_id`) where it can be reused in `pdu` and `pdu_v3` (for rooms v3). These definitions are further moved into the room version specifications where they can highlight the exact schemas in detail. Version 1 has been updated to include the pre-existing event format, however the core principles of the room have not been changed. The same applies to room version 2. Room versions have immutable core principles once in the spec, otherwise these format changes would land in a pre-existing version. The client-server API event formats will need updating, however that is being punted to a different commit to try and keep these changes reviewable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This starts implementing support for V3 rooms, while keeping V3 disabled