140 Commits
Author SHA1 Message Date
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 H. Pham 1339e4674a Extract named HTML transform configs for preview and attachments 2026-10-20 10:03:55 +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
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 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
dab246 8a21e35d1e fix: Prefer reusing AppBaseException instead of redefining the exception contract CacheException and RemoteException 2026-03-10 11:06:16 +07:00
dab246 fe57e72a02 TF-4236 Apply BatchSetEmailProcessingMixin for some method use SetEmailMethod 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 a23d15a9ca TF-4136 refactor(logging): replace logError with logWarning for non-critical cases 2026-01-06 13:53:22 +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 993cdb235a TF-4029 Fix singular vs plural for attachments 2025-09-19 12:19:06 +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
dab246 7342bbc11d TF-3601 View entire message on dialog
Signed-off-by: dab246 <tdvu@linagora.com>
2025-04-03 02:38:48 -07:00
dab246 0b9bb3530c Fix appear save draft dialog when reload editing composer
Signed-off-by: dab246 <tdvu@linagora.com>
2025-04-01 04:40:13 -07:00
dab246 4765921a35 TF-3514 Detect base64 image to transfer it to cid attachment
Signed-off-by: dab246 <tdvu@linagora.com>
2025-03-10 03:02:19 -07:00
DatDang f66e1460e4 TF-3454 Download all attachments as ZIP 2025-02-18 20:13:16 -08:00
dab246 778c138a10 TF-3427 Collapse side features of the composer in a side menu
Signed-off-by: dab246 <tdvu@linagora.com>
2025-02-05 03:00:08 -08:00
dab246 6fa66efce2 TF-3427 Implement print draft
Signed-off-by: dab246 <tdvu@linagora.com>
2025-02-05 03:00:08 -08:00
dab246 32bb405891 fixup! TF-3416 Update jmap-dart-client dependency 2025-02-05 03:00:08 -08:00
dab246 91f3275a54 TF-3416 Handle download attachment in EML previewer on mobile 2025-02-05 03:00:08 -08:00
dab246 27f64d97a8 TF-3416 Handle open EML attachment in EML previewer on mobile 2025-02-05 03:00:08 -08:00
dab246 33d0e91178 TF-3416 Handle preview EML attachment on mobile 2025-02-05 03:00:08 -08:00
dab246 aa7fded1ff TF-3416 Handle open EML attachment in EML previewer 2025-02-05 03:00:08 -08:00
dab246 0ce99c745c TF-3416 Persist preview EML content when make reload page action 2025-02-05 03:00:08 -08:00
dab246 d304083b2e TF-3416 Implement preview EML attachment 2025-02-05 03:00:08 -08:00
dab246 7cbdfddb6d TF-3416 Implement parse email by blob id interactor 2025-02-05 03:00:08 -08:00
dab246 840645b8f1 TF-3430 Fix reply and forward button are not synced 2025-02-05 03:00:08 -08:00
DatDang 492f4f8350 TF-3385 Get & set multiple changes in email cache 2025-02-05 03:00:08 -08:00
DatDang 4bf4113c88 TF-3385 Update cache on set method 2025-02-05 03:00:08 -08:00
dab246 0f94e52d35 TF-3370 Handle SetError when make email action (Mark as read/star/move/delete) 2025-02-05 03:00:08 -08:00
dab246 6063f4b832 TF-3334 Remove Email/get of unsubscribe email action 2025-02-05 03:00:08 -08:00
dab246 eb51e9b3b1 TF-3334 Remove Email/get of mark as read & mark as star action 2025-02-05 03:00:08 -08:00
dab246 e9547c780c TF-3349 Escape messages when print email 2025-02-05 03:00:08 -08:00
DatDang 82a49c5923 TF-3035 Restore identity from draft 2024-09-16 10:26:41 +07:00
dab246 c013e0306c TF-2667 Add cancel button in progress saving message to drafts dialog 2024-06-11 13:59:12 +07:00
dab246 f2b70aec48 TF-2667 Add cancel button in progress send message dialog 2024-06-11 13:59:12 +07:00
dab246 e232514f6b TF-2667 Show sending message dialog when click send button 2024-06-11 13:59:12 +07:00