-
Notifications
You must be signed in to change notification settings - Fork 11.8k
fix: Quote chaining in E2EE room not limiting quote depth #36143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
🦋 Changeset detectedLatest commit: 7503729 The changes in this PR will be included in the next version bump. This PR includes changesets to release 36 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #36143 +/- ##
===========================================
- Coverage 64.93% 64.56% -0.38%
===========================================
Files 3112 3129 +17
Lines 93748 98364 +4616
Branches 17812 18689 +877
===========================================
+ Hits 60878 63508 +2630
- Misses 30085 32031 +1946
- Partials 2785 2825 +40
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
apps/meteor/client/components/message/toolbar/items/actions/QuoteMessageAction.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: Tasso Evangelista <[email protected]>
Proposed changes (including videos or screenshots)
This issue occurs because we only enforce the quote chaining limit on the server, but the server cannot evaluate the message or its content due to the message being encrypted.
Due to this constraint, the limit can only be applied client-side before the message is
sentdecrypted, and that is what was done. This also improves UX since previously the quote preview did not evaluate the chain limit, causing a mismatch between what showed in the preview and what was actually experienced once the message was sent*.Caveats:
through the APIthat exceed said limit. There's no way around this. UPDATE: Quote attachments are based on message permalinks. We cannot prevent sending deeply nested quotes. Instead, we prune quotes that exceed the depth limit at decryption time.no limit to quotes was applied to the message layout, as to not break expected behavior. This means that encrypted messages sent through the APIs can display quote chains bigger thant the limit (see previous caveat).UPDATE: See caveat update above. Layout modifications were applied solely to e2ee messages.Update:
Unfortunately the mechanism for sending e2ee messages with quotes was misinterpreted, so some of what was said above is not true. Attachments for e2ee messages are processed at the time of decryption, and there's no control of the depth of quote chaining at the time of sending it. For this reason, for e2ee messages only, the limit was applied during the decryption step, which changes the rendered content when the setting changes.
Some of the caveats
Issue(s)
SUP-782
Steps to test or reproduce
Further comments
It's not clear whether the message layout should also respect the limit, but historically it has not, so no attempt was or will made to change the message layout at this point. If this changes at any point, a new PR is warranted.