Commit Graph
142 Commits
Author SHA1 Message Date
Dat H. Pham 67fa909722 Fix/composer embed code xss (#5070) 2026-11-02 11:05:37 +07:00
Dat Dang 5807b75604 2509 Sanitize composer reply/forward, mailto and pasted content (#5069) 2026-10-29 15:15:29 +07:00
Dat Dang 94869ef006 Check every HTML pipeline on its own viewer with named rule sets (#5020) 2026-10-22 13:04:45 +07:00
Dat H. Pham fe148f2f81 Test HTML email display rules on every viewer and pane width (#4966) 2026-10-21 05:01:30 +07:00
Dat H. Pham 57d1dabb12 Name the empty-reply test for what it checks: the signature is blocked 2026-10-20 10:03:55 +07:00
Dat H. Pham 1ae14aa53b Find every pipeline, reject sidecar typos, and keep one HTML corpus in core 2026-10-20 10:03:55 +07:00
dab246 484d7f020e Lay out RTL corpus fixtures right to left in the Chrome layout test 2026-10-20 10:03:55 +07:00
Dat H. Pham 05ae9e4ce3 Cover pipeline call sites and quote escaping; drop tests that prove nothing 2026-10-20 10:03:55 +07:00
Dat H. Pham f4c7f927aa fixup! Lock HTML sanitizer policy and transform pipelines with golden files 2026-10-20 10:03:55 +07:00
Dat H. Pham fda6d8a0a2 fixup! Cover every HTML pipeline from one registry 2026-10-20 10:03:55 +07:00
Dat H. Pham 75d41a05c3 fixup! Cover untested HTML DOM transformers and corpus structure 2026-10-20 10:03:55 +07:00
Dat H. Pham 54834fa2f1 fixup! Assert corpus layout and content survive HtmlTransform 2026-10-20 10:03:55 +07:00
Dat H. Pham 7759388e20 fixup! Record the empty-reply XSS gap in the pipeline registry until it is fixed
x
2026-10-20 10:03:55 +07:00
Dat H. Pham b7bf0d5cc4 Record the empty-reply XSS gap in the pipeline registry until it is fixed 2026-10-20 10:03:55 +07:00
Dat H. Pham fab93b0678 Build viewer HTML documents in one tested builder; name plain-text pipeline 2026-10-20 10:03:55 +07:00
Dat H. Pham 047adddcf4 Lock HTML sanitizer policy and transform pipelines with golden files 2026-10-20 10:03:55 +07:00
Dat H. Pham 26b6139e76 Assert corpus layout and content survive HtmlTransform 2026-10-20 10:03:55 +07:00
Dat H. Pham 5a689001b0 Cover every HTML pipeline from one registry 2026-10-20 10:03:55 +07:00
Dat H. Pham 62a67bd10f Add quote-wrap, provenance, viewer, and Chrome layout tests 2026-10-20 10:03:55 +07:00
Dat H. Pham d6d0d11d18 Cover untested HTML DOM transformers and corpus structure 2026-10-20 10:03:55 +07:00
Dat H. Pham 484937fdd6 Add TransformConfiguration input-trust contract tests 2026-10-20 10:03:55 +07:00
dab246 94083efede TF-4882 test(composer): Cover every ListKeyboardHandlerScript guard in the Chrome test 2026-10-14 17:39:25 +07:00
dab246 f4c8daa16c TF-4882 fix(composer): Skip Tab indent on the first list item to stop stray bullets 2026-10-14 17:39:25 +07:00
Benoit TELLIERandClaude Opus 5.5 810d7e0b99 TF-4882 feat(composer): Tab/Shift+Tab nest list items, Enter on empty nested item outdents
Summernote only binds Tab to list nesting when tabDisable is set, and even
then it inserts spaces. Register a keydown handler on the web editor that:
- delegates Tab / Shift+Tab inside a list item to the Summernote
  indent / outdent commands (same as the toolbar buttons);
- outdents an empty nested list item on Enter instead of leaving the list,
  like Gmail. Enter on an empty top-level item still exits the list.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 17:39:25 +07:00
dab246 410977d67a TF-4874 fix(html): drop scheme-added hrefs that SanitizeUrl fails to decode 2026-10-14 16:23:21 +07:00
dab246 07c3d7e1f7 TF-4874 fix(html): keep www. and protocol-relative hrefs as https links, drop them when SanitizeUrl rejects 2026-10-14 16:23:21 +07:00
dab246 349ec96884 TF-4874 test(html): cover padded, unparsable and badly percent-encoded hrefs in SanitizeHyperLinkTagInHtmlTransformer 2026-10-14 16:23:21 +07:00
dab246 c30b68aae7 TF-4874 test(html): assert exact anchors in relative-href test so the kept <base> no longer fails it 2026-10-14 16:23:21 +07:00
Benoit TELLIERandClaude Opus 5.5 28dc354bce TF-4874 fix(html): drop relative hrefs instead of rewriting them to a bogus host
SanitizeUrl prefixed any scheme-less href that looked like a domain
with https://, so <a href="page.html"> became https://page.html.
Relative links cannot be resolved since <base> is stripped: remove
their href to make them inert. In-page fragments are kept.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 16:23:21 +07:00
dab246 89bf039cdf TF-4873 test(eml-preview): cover quoted url, grouping at-rules, unicode range cap and out-of-range escapes in CssScopeUtils 2026-10-12 19:04:35 +07:00
dab246 1d33a46222 TF-4873 fix(eml-preview): drop email @page rules in CssScopeUtils so a mail cannot print text in the page margins 2026-10-12 19:04:35 +07:00
dab246 19ceb4c855 TF-4873 fix(eml-preview): stack the preview subject and attachments above the email body layer 2026-10-12 19:04:35 +07:00
dab246 d658fdfa3c TF-4873 fix(eml-preview): drop email @font-face rules in CssScopeUtils so a mail font cannot redraw the app header 2026-10-12 19:04:35 +07:00
dab246 b7b1748c74 TF-4873 fix(eml-preview): stack the preview header above an email-body-layer the email styles cannot reach 2026-10-12 19:04:35 +07:00
dab246 3e3430964f TF-4873 fix(eml-preview): rewrite html and body to :is(:where(:scope), <selector>) in CssScopeUtils to keep their specificity, and accept u+element selectors 2026-10-12 19:04:35 +07:00
dab246 828053e9db TF-4873 fix(eml-preview): escape </style in CssScopeUtils output so a neutralized brace cannot end the style element 2026-10-12 19:04:35 +07:00
Dat H. Pham 679a20cac8 TF-4873 test(eml-preview): cover style end tag, specificity and header overlay 2026-10-12 19:04:35 +07:00
dab246 dd23c0c311 TF-4873 fix(eml-preview): join html and body into one :scope only across CSS whitespace or > 2026-10-12 19:04:35 +07:00
dab246 42a88aa5ba TF-4873 fix(eml-preview): rewrite html and body type selectors to :scope in CssScopeUtils so mail body rules still apply 2026-10-12 19:04:35 +07:00
dab246 d2f2b3e3a5 TF-4873 test(eml-preview): cover numbers, hyphen idents, url escapes and lone CR/FF in CssScopeUtils 2026-10-12 19:04:35 +07:00
dab246 99c6b6daea TF-4873 fix(eml-preview): keep a CSS string open across the whitespace a hex escape swallows in CssScopeUtils 2026-10-12 19:04:35 +07:00
dab246 61b786127e TF-4873 fix(eml-preview): read <!-- as one CDO token in CssScopeUtils so a url( after it cannot hide the brace that closes @scope 2026-10-12 19:04:35 +07:00
Benoit TELLIERandClaude Opus 5.5 4d4f47851c TF-4873 fix(eml-preview): scope mail CSS to the email body
The EML preview renders the mail content in the same document as the
app-generated header (subject, sender, recipients, date), so global mail
rules such as '* { font-family: ... !important }' restyled that header.

Wrap every mail <style> into '@scope (.email-body) { ... }'. A CSS
tokenizer neutralizes any '}' that would close the @scope block early,
honoring comments, strings, escapes and url() tokens, and drops the CSS
when unicode-range tokenization differs between browsers.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-12 19:04:35 +07:00
Dat Dang 9aa422b860 2509 Sanitize nested CSS at-rules and drop remote url() inside them (#4952) 2026-10-05 14:44:18 +07:00
dab246 704ecd84b2 TF-4809 Part 3: Align Sentry startup and reporting consent 2026-10-05 12:22:17 +07:00
dab246 e6e9ed633c TF-4809 Part 3: Add web Sentry fallback and denied consent 2026-10-05 12:22:17 +07:00
dab246 eec2fbab39 TF-4809 Part 3: Harden Sentry ecosystem consent handling 2026-10-05 12:22:17 +07:00
Dat VuandDat H. Pham c0eb30d2d6 TF-4809 Part 1-C: Apply consent in iOS notification extension (#4836)
* TF-4809 Part C: Apply consent in iOS notification extension

* TF-4809 Part C: Apply consent in iOS notification extension

* TF-4809 Part C: Harden NSE consent persistence

* TF-4809 Part C: Fix duplicate Mockito mock generation

* TF-4809 Part C: Use rethrow for Sentry errors

* TF-4809 Part C: Fix analyzer warnings

* TF-4809 Move Sentry cleanup to session teardown

* TF-4809 Fix BaseController test isolation

* TF-4809 Add tests for consent reset on session cleanup

* TF-4809 Reset Sentry consent on session cleanup

---------

Co-authored-by: Dat H. Pham <dphamhoang@linagora.com>
2026-10-05 12:15:05 +07:00
dab246 9f3665eb47 TF-4809 Part A: Gate Sentry SDK lifecycle by consent 2026-10-05 12:15:04 +07:00
Đặng Đạt 8615e7a240 2509 Let ExternalLinkPolicy decide which link schemes survive sanitizing 2026-10-05 10:20:52 +07:00