230 Commits
Author SHA1 Message Date
Dat Vu d9de1d23bc TF-5095 Limit attachment file names to 255 UTF-8 bytes (#5149) 2026-11-25 13:49:46 +07:00
Dat Vu 7405c072bc Drop unsafe-inline from the web CSP with a per-request script nonce (#5135) 2026-11-13 16:51:45 +07:00
Dat Dang 5807b75604 2509 Sanitize composer reply/forward, mailto and pasted content (#5069) 2026-10-29 15:15:29 +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 1339e4674a Extract named HTML transform configs for preview and attachments 2026-10-20 10:03:55 +07:00
dab246 b2c3cf9b9f TF-4953 feat(email): map the forbiddenToSend submission error to ForbiddenToSendException 2026-10-19 11:14:37 +07:00
Dat Dang ad637aa695 TF-4827 Split FileInfo into one sealed subtype per byte source (#4853) 2026-10-13 13:56:25 +07:00
Dang Dat 90095166dd 2509 Strip bidi and control characters from attachment names 2026-10-02 12:32:16 +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
dab246 882b499bac TF-4815 Save web composer snapshot synchronously in beforeunload and keep it after restore 2026-10-01 10:42:32 +07:00
Benoit TELLIER 1c55a46682 TF-4843 feat(composer): handle EmailSubmission/set invalidRecipients (#4844) 2026-09-25 19:36:44 +07:00
Benoit TELLIER 1353436253 Hide Twake Calendar visio section when rendering ICS description (#4803) 2026-09-07 09:42:08 +07:00
Dat Vu 6cfdef0fcf TF-4524 Fix blank plain-text email caused by backslash-hex false-positive in HTML sanitizer (#4527) 2026-05-18 16:35:54 +07:00
Dat H. Pham 14066c830d fix: cleanup code style 2026-05-15 13:13:29 +07:00
Dat H. Pham 6e62dc8c53 fix: codescene comment 2026-05-15 13:13:29 +07:00
Dat H. Pham 86c4b4ca2f fix: show orphaned inline attachments in email attachment panel
When a received email contains an inline attachment with a CID but no
matching img[src="cid:..."] in the HTML body, tmail previously hid it
completely — not shown in the body (no img tag) and not in the attachment
panel (isOutsideAttachment returned false due to hasCid+isDispositionInlined).

In GetEmailContentInteractor, extract referenced CIDs from the raw HTML
before transformation, then split allInlineImages into referenced (rendered
in body) and orphaned (no body reference). Orphaned attachments are promoted
to the attachment panel so users can see and download them.
2026-05-15 13:13:29 +07:00
Dat H. Pham e7d9c421b3 fix: prevent orphaned inline attachments from being re-forwarded
In replaceImageBase64ToImageCID, the early-return path blindly returned
all inline attachments even when none were referenced by a cid: img tag
in the HTML body. This caused orphaned inline blobs (CID present in JMAP
metadata but no body reference) to be silently re-attached on every
reply/forward, propagating malformed MIME structure across the thread.

Fix 1: early-return now checks for actual img[src^="cid:"] body references
before including any attachment — orphaned entries are dropped.

Fix 2: after the base64 loop, scan remaining cid: img tags and include
their attachments so images that failed to download are still forwarded.
2026-05-15 13:13:29 +07:00
Dat Vu 54ffff4e1d Hotfix: Second Save as Draft Fails for Draft Emails with Attachments or Inline Images (#4505) 2026-05-14 17:11:45 +07:00
Dang Dat 979ba0f671 TF-4308 add data layer for addListLabelToListEmails 2026-04-14 17:16:10 +07:00
Dat Vu 8fff83a735 [HOT-FIX] Download attachment is failed on iOS (#4405) 2026-03-24 22:16:43 +07:00
dab246 8a21e35d1e fix: Prefer reusing AppBaseException instead of redefining the exception contract CacheException and RemoteException 2026-03-10 11:06:16 +07:00
dab246 9c211c05ef feat: Auto sync label from web socket 2026-03-05 10:32:56 +07:00
dab246 38074ab9f7 TF-4236 Misleading variable name: maxBatches represents batch size, not batch count. 2026-01-27 12:04:11 +07:00
dab246 fe57e72a02 TF-4236 Apply BatchSetEmailProcessingMixin for some method use SetEmailMethod 2026-01-27 12:04:11 +07:00
dab246 a05a28700a TF-4236 Fix partial-update validation for thread label ops. 2026-01-27 12:04:11 +07:00
dab246 879b18bc45 TF-4236 Fix guard delete UI when no handler is provided. 2026-01-27 12:04:11 +07:00
dab246 1058b94363 TF-4236 Implement remove a label from an thread 2026-01-27 12:04:11 +07:00
dab246 36e573db23 TF-4236 Add repository/interactor for remove a label from an email 2026-01-27 12:04:11 +07:00
dab246 94fd6f8071 TF-4195 Add Label to Thread 2026-01-19 11:34:43 +07:00
dab246 e8b2c1d2a5 TF-4195 Fix comments of coderabbit 2026-01-19 11:34:43 +07:00
dab246 0d247b30d7 TF-4195 Add interactor/repository/datasource to feature add a Label to an email 2026-01-19 11:34:43 +07:00
dab246 6f455cc728 fix(mu): email content not displayed due to sanitize html
(cherry picked from commit 2f06e52d81)
2026-01-12 05:16:02 +07:00
dab246 a23d15a9ca TF-4136 refactor(logging): replace logError with logWarning for non-critical cases 2026-01-06 13:53:22 +07:00
dab246 972b20ec16 TF-4050 Preview and download uploaded file in composer on web 2025-11-11 17:48:33 +07:00
dab246 92286b48e1 TF-4050 refactor: move attachment preview & download logic to download controller 2025-11-11 17:48:33 +07:00
dab246 b34b4455cd TF-4053 Verify empty widget in Inbox when perform E2E for move folder content 2025-11-05 05:34:21 +07:00
dab246 369316f50d TF-4053 Add interactor/datasource/repository for move folder content action 2025-11-05 05:34:21 +07:00
dab246 be8eaf6258 TF-4128 Separate download handling into independent class to decouple from views on web 2025-11-03 12:47:05 +07:00
dab246 df49ce03c7 TF-4058 Upgrade dependencies to compatible with flutter version 3.32.8 2025-10-15 13:54:34 +07:00
dab246 993cdb235a TF-4029 Fix singular vs plural for attachments 2025-09-19 12:19:06 +07:00
dab246 346b115169 TF-3944 Use new style with line height 24px in content writing of composer view
Signed-off-by: dab246 <tdvu@linagora.com>
2025-08-22 11:02:01 +07:00
DatDang 4fd0931c9e TF-3586: Upgrade Flutter to 3.27.4 2025-07-30 15:24:57 +07:00
dab246 6f87058459 Remove async function for SessionStorageManager
Signed-off-by: dab246 <tdvu@linagora.com>
2025-07-17 10:57:43 +07:00
dab246 9a2f0aa356 Handle web finger to get token in HomeController
Signed-off-by: dab246 <tdvu@linagora.com>
2025-07-17 10:57:43 +07:00
dab246 8579eb2518 TF-3792 Hide buttons of blue bar in case of event not belong to this account and change
Signed-off-by: dab246 <tdvu@linagora.com>
2025-06-26 15:50:16 +07:00
DatDang 7f09f9ceb4 TF-3515 Add save email as template feature 2025-05-15 23:32:31 -07:00
DatDang 9df53ef6b9 TF-3591 Implement CalendarEventCounter/accept method 2025-04-16 21:41:11 -07:00
DatDang ad05c68453 TF-3589 Calendar event attendance status 2025-04-08 23:35:55 -07:00
DatDang 4538959d30 TF-3578 Calendar event show free busy status 2025-04-04 00:13:40 -07:00
dab246 7342bbc11d TF-3601 View entire message on dialog
Signed-off-by: dab246 <tdvu@linagora.com>
2025-04-03 02:38:48 -07:00