Commit Graph
709 Commits
Author SHA1 Message Date
Dat H. Pham 57e5498d9d Add quote-wrap, provenance, viewer, and Chrome layout tests 2026-10-08 08:55:48 +07:00
Dat H. Pham 8b557659f5 Cover untested HTML DOM transformers and corpus structure 2026-10-08 08:55:48 +07:00
dab246 0ef5aabf2d TF-4894 test(labels): cover desktop « Label as » click in ThreadDetailController.onThreadDetailMoreActionClick 2026-10-08 08:12:40 +07:00
dab246 5d2a111d22 TF-4894 test(labels): cover desktop « Label as » click in EmailActionReactor.handleMoreEmailAction 2026-10-08 08:12:40 +07:00
dab246 aa6455da92 TF-4867 Test that '/' stays allowed in folder names 2026-10-08 07:10:16 +07:00
dab246 1d6f505262 TF-4867 Wrap folder name errors on up to three lines in create and rename inputs 2026-10-08 07:10:16 +07:00
Benoit TELLIERandClaude Opus 5.5 288f961a9b TF-4867 Reject '.' in folder names client-side with an explicit localized message
The server rejects mailbox names containing '.' (hierarchy delimiter),
which surfaced as a raw English toast. Validate it client-side and
replace the generic 'special characters' error with a message listing
the forbidden characters.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 07:10:16 +07:00
dab246 dc7255a8fa TF-4871 Test rule target filtering in DestinationPickerController 2026-10-07 09:44:38 +07:00
dab246 09cbd4b0fb TF-4864 Split getHeaderEmailQuoted tests into top-level helpers to shrink main 2026-10-07 09:42:31 +07:00
dab246 aa93aceb1e TF-4864 Translate quote header date and time joiner for shipped locales 2026-10-07 09:42:31 +07:00
dab246 6a17cf8e22 TF-4864 Test reply and forward quote header date and wording in en and fr 2026-10-07 09:42:31 +07:00
Benoit TELLIERandClaude Opus 5.5 aa1e9bbb7a TF-4862 Do not re-apply an already expanded signature on web content load
When the loaded content already holds a top-level .tmail-signature,
restoreCollapsibleSignatureButton re-applied it, which consumed the one-shot
draft hash synchronization before the identity signature got inserted. The
baseline hash could then differ from the content and closing the unmodified
composer prompted to save.

Also drop the stray .hee-tmp gitlink accidentally committed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 09:40:26 +07:00
Benoit TELLIERandClaude Opus 5.5 6c613abf19 TF-4862 Resynchronize draft hash on inserted signature, not on removed signature button
Since TF-4034 the identity signature is inserted with allowCollapsed: false,
so the editor produces a top-level .tmail-signature without any
.tmail-signature-button. synchronizeInitEmailDraftHash still waited for the
button, so on web the baseline hash was never re-taken once the signature
landed and closing an unmodified composer always prompted to save.

Detect the top-level .tmail-signature instead, ignoring signatures nested in
quoted content.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 09:40:26 +07:00
Benoit TELLIERandClaude Opus 5.5 e4c6422443 TF-4862 Do not prompt to save draft when closing unmodified reply/forward composer
Reply, reply all and reply to list were never given a baseline draft
hash, so closing them always prompted.

On web, the identity signature is inserted asynchronously into the
editor, after the baseline hash has been computed. The re-baseline
done on signature insertion was limited to compose, so any
reply/forward/edit-as-new with a signature was seen as modified.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 09:40:26 +07:00
Benoit TELLIERandClaude Opus 5.5 20e4c575cd TF-4862 Init draft hash for edit-as-new with preselected identity on web
When the identity is restored from the email header, setupSelectedIdentity
returned early without calling onCompleteSetupComposer on web, leaving the
saved draft hash unset for editAsNewEmail.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 09:40:26 +07:00
Benoit TELLIERandClaude Opus 5.5 a8396a9ee0 TF-4862 Do not prompt to save draft when closing unmodified forward/edit-as-new composer
initEmailDraftHash only set a baseline hash for compose and editDraft,
leaving it null for forward and editAsNewEmail. Any close was therefore
considered a modification and triggered the save-to-drafts dialog.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 09:40:26 +07:00
dab246 704ecd84b2 TF-4809 Part 3: Align Sentry startup and reporting consent 2026-10-05 12:22:17 +07:00
dab246 5399267098 TF-4809 Part 3: Restore web Sentry after consent is re-enabled 2026-10-05 12:22:17 +07:00
dab246 5fab73907d TF-4809 Part 3: Update keychain Sentry consent tests 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
dab246 8e50fc0380 TF-4809 Part 3: Clarify Sentry reporting default 2026-10-05 12:16:55 +07:00
dab246 6f3b757ef6 TF-4809 Part 3: Share Sentry ecosystem opt-in default with web 2026-10-05 12:16:55 +07:00
dab246 1e783fbc38 TF-4809 Part 3: Configure Sentry reporting default 2026-10-05 12:16:55 +07:00
dab246 68fbf7144c TF-4809 Part 2: Add Sentry reporting preference 2026-10-05 12:16:55 +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 65c31dfc2c TF-4809 Part B: Reuse Sentry for unchanged FCM config 2026-10-05 12:15:05 +07:00
dab246 e78120abb6 TF-4809 Part B: Harden Sentry FCM consent 2026-10-05 12:15:05 +07:00
dab246 fdda202292 TF-4809 Part B: Persist consent for FCM background 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 9510b710aa 2509 Declare webcal and geo schemes and report links no app can open
Addresses: 622656
https://ci.linagora.com/tddang/tmail-flutter/-/merge_requests/5#note_622656
2026-10-05 10:20:52 +07:00
dab246 f30f7c6cd7 2509 Cover the blocked-link callback in the iOS EML previewer dialog 2026-10-05 10:20:52 +07:00
dab246 e28f4dd306 2509 Cover the blocked-link callback forwarded by the calendar event detail 2026-10-05 10:20:52 +07:00
dab246 04adcfa973 2509 Cover the blocked-link toast shown by BaseController 2026-10-05 10:20:52 +07:00
Đặng Đạt d1990bcc9e 2509 Show the blocked-link toast in invite descriptions and HTML attachments
Addresses: 621394, 622055
https://ci.linagora.com/tddang/tmail-flutter/-/merge_requests/5#note_621394
https://ci.linagora.com/tddang/tmail-flutter/-/merge_requests/5#note_622055
2026-10-05 10:20:52 +07:00
Đặng Đạt 770bd30dfc 2509 Cover the noopener decision for links opened from the EML previewer
Addresses: 621393, 622054
https://ci.linagora.com/tddang/tmail-flutter/-/merge_requests/5#note_621393
https://ci.linagora.com/tddang/tmail-flutter/-/merge_requests/5#note_622054
2026-10-05 10:20:52 +07:00
dab246 7f05b9bda9 2509 Cover the Android and iOS content viewers' external link guard 2026-10-05 10:20:52 +07:00
dab246 6be0fbcff4 2509 Pass and check the blocked-link callback in the previewer call-site test 2026-10-05 10:20:52 +07:00
Đặng Đạt be2c4b5fb6 2509 Fix misleading link-policy test inputs and names
Addresses: 621393
https://ci.linagora.com/tddang/tmail-flutter/-/merge_requests/5#note_621393
2026-10-05 10:20:52 +07:00
Dang Dat f541de05de 2509 Route AppUtils.launchLink and ICS conference links through the scheme allow-list
AppUtils.launchLink was the one shared entry point for opening links
externally, but it launched any URL/scheme unguarded, including its own
Safari<17 branch which called window.open directly and skipped
url_launcher_web's own scheme block and noopener/noreferrer. Route both
paths through ExternalLinkPolicy (now also allowing mailto, since
launchLink already had legitimate mailto callers) and restore
noopener/noreferrer on the Safari branch.

The calendar invite's video-conference extension fields
(X-OPENPAAS-VIDEOCONFERENCE / X-GOOGLE-CONFERENCE) are attacker-controlled
and only checked for non-empty values before reaching the same launch
path via the "join" button; filter them through the same allow-list at
the source.
2026-10-05 10:20:52 +07:00
Dang Dat 96dd60b373 2509 Restrict openApp deep links to allow-listed hosts and show a toast when refused 2026-10-05 10:07:54 +07:00
Dat Dang 71af403ff9 2509 Require https for the openApp deep link's JMAP and identity provider URLs (#4919) 2026-10-02 16:06:37 +07:00
Dang Dat 90095166dd 2509 Strip bidi and control characters from attachment names 2026-10-02 12:32:16 +07:00
Dang Dat 6f0995c723 2509 Escape notification text and use private lock-screen visibility 2026-10-02 09:57:23 +07:00
Dang Dat f3f76878e7 2509 Never send credentials with WebFinger discovery requests 2026-10-01 17:06:29 +07:00
Dang Dat 9e4152639f 2509 Escape header fields in the EML preview and remove the unused PDF viewer
The EML / full-message preview and the print page build their header
as an HTML string. Subject, sender, recipients, date, attachment names
and the attachment link were inserted unescaped, so a crafted header
value became markup in a same-origin page.
DownloadManager.openDownloadedFileWeb loaded pdf.js/pdfobject from a
CDN and put the file name unescaped into a blob page. Nothing calls it.

PreviewEmlFileUtils and PrintUtils escape every text field at the sink.
Callers pass raw strings and no longer pre-escape them. The attachment
link is attribute-escaped and built with Uri, so file names survive the
round-trip. The inline-image alt and id attributes are attribute-escaped.
openDownloadedFileWeb, its CDN loaders and js_interop_stub.dart are
removed, and DownloadManager no longer takes DeviceInfoPlugin.
2026-10-01 15:49:46 +07:00
Đặng Đạt e327c1202e 2509 Try DNS-over-HTTPS before system DNS for JMAP discovery
Automatic server discovery takes the _jmap._tcp SRV target as the
login server. The plain-DNS client uses a predictable transaction id
and doesn't check that an answer matches the question, so on an
untrusted network a spoofed answer could send discovery, and then
login, to the wrong host. Public UDP and DoH also shared the same
priority, so which one ran first was undefined.

Lookup order is now public DoH -> system -> public UDP -> cloud.
System DNS stays second so VPN users whose _jmap record is only
visible to the internal resolver (#3976) still get discovered. Each
mode has its own priority level, so the order is deterministic, and a
test pins it.
2026-10-01 13:37:41 +07:00
Dat H. Pham b58b06a5a4 TF-4815 Test switched identity and signature survive web reload 2026-10-01 10:42:32 +07:00
dab246 ef210179c1 TF-4815 Prefer latest draft hash over route arguments in reconnect composer cache 2026-10-01 10:42:32 +07:00
dab246 8c56765395 TF-4815 Discard web composer snapshots on explicit logout 2026-10-01 10:42:32 +07:00