Commit Graph
71 Commits
Author SHA1 Message Date
dab246 d0c0ecd419 TF-4540 Fix left margin of email truncated on email view
Signed-off-by: dab246 <tdvu@linagora.com>
2026-06-11 15:22:03 +07:00
dab246 2c5f4075b9 fix: use const instead of final for string literal in test 2026-06-10 19:25:01 +07:00
Dat Vu 6b9dd5336f Fix: Calendar event HTML description rendered as plain text (#4558) 2026-05-28 15:27:33 +07:00
dab246 24b75ed9da TF-4482 Use declaration-aware regex for overflow-wrap detection and expand test coverage 2026-05-25 15:50:47 +07:00
dab246 431a4f1ec2 TF-4482 Add tests for ResponsiveTableCellTransformer coverage and pipeline coexistence 2026-05-25 15:50:47 +07:00
dab246 f7e871220b TF-4482 Fix invitation email content overflowing on narrow mobile screens 2026-05-25 15:50:47 +07:00
dab246 4208b530f3 TF-4532 Add tests for CSS cascade order and dedup loop proof 2026-05-21 14:24:56 +07:00
dab246 d134f823bc TF-4532 Add unit tests for height stabilization and CSS override 2026-05-21 14:24:56 +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 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 H. Pham b0e349029f fix(logging): minor issue for logging and docs 2026-04-28 11:31:12 +07:00
dab246 1a30b3f681 refactor(logging): rename handles() to canHandle() for clarity 2026-04-28 11:31:12 +07:00
dab246 772a8b8453 style(logging): remove section divider comments in console_log_handler_test 2026-04-28 11:31:12 +07:00
dab246 26ed041e34 refactor(logging): pass LogRecord to handles() and add default implementation via acceptsLevel() 2026-04-28 11:31:12 +07:00
dab246 4c0fa41d5b refactor(logging): move LogRecord construction into LogRecord.build factory 2026-04-28 11:31:12 +07:00
dab246 885c8e56aa test(logging): add handlerKey, fault-isolation, and critical-level coverage
- handlerKey: verify two instances of same class with distinct keys coexist,
  same key replaces existing handler, both handlers receive dispatched records
- fault-isolation: verify handles()/handle() throwing does not crash dispatch
  and remaining handlers still receive the record
- critical level: verify Level.critical maps to SentryLevel.fatal in both
  captureException and captureMessage paths of SentryEventHandler
2026-04-28 11:31:12 +07:00
dab246 6c5948557c fix(logging): isolate handler failures and fix fake reporter override
- Wrap each handler.handle() in try/catch so a failing handler does not
  abort the remaining handlers or bubble exceptions to callers
- Fix _FakeSentryReporter.addBreadcrumb signature to match SentryReporter
  interface (add level and category named parameters)
2026-04-28 11:31:12 +07:00
dab246 28000d4636 fix(logging): propagate level/category on breadcrumbs, align captureMessage signature
- addBreadcrumb gains level (default SentryLevel.debug) and category
  params in SentryReporter interface and SentryManager implementation;
  SentryBreadcrumbHandler passes level: SentryLevel.debug, category: 'log'
  so breadcrumbs on error events are clearly labelled in Sentry UI
- captureMessage param order aligned to {extras, level} in SentryManager
  to match the SentryReporter interface declaration
- Test: _FakeSentryReporter updated; new test case asserts level/category
2026-04-28 11:31:12 +07:00
dab246 1b4723ef05 fix(logging): restore per-call webConsoleEnabled as first-class flag
webConsoleEnabled was deprecated in favour of a global constructor flag,
but that removed the ability to force specific log calls visible on web
in release/profile mode — a legitimate need for auth and Sentry init
diagnostics.

Carry webConsoleEnabled through the full pipeline:
LogRecord → buildLogRecord → _dispatch → public log functions.
ConsoleLogHandler reads the flag from the record rather than from its
constructor, so per-call opt-in works independently of build mode.

On web:
- handles() always returns true (filter deferred to handle())
- handle() prints only when record.webConsoleEnabled || isDebugMode

Existing call sites (authorization_interceptors, sentry_config) that
pass webConsoleEnabled: true are preserved and functional again.
2026-04-28 11:31:12 +07:00
dab246 c36384fb73 test(logging): strengthen handler pipeline tests
- app_logger_registry: add _OtherFakeHandler subclass; fix
  'dispatches to multiple handlers' to register two distinct types
  and assert both receive the record; use const LogRecord
- sentry_breadcrumb_handler: track capturedExceptions/capturedMessages
  in fake; assert both are empty in 'does not call' test
- sentry_event_handler: add SentryLevel to fake captured records;
  assert mapped severity in captureException/captureMessage tests
2026-04-28 11:31:12 +07:00
dab246 57975331d5 test(logger): add unit tests for logging pipeline (ADR-0078) 2026-04-28 11:31:12 +07:00
dab246 5e1d99125e TF-4265 Exclude our signature by add removeTMailSignature option to extractPlainText method 2026-04-07 13:20:25 +07:00
dab246 fedb8fed93 TF-4136 Apply early exit to prevent string operation in log 2026-01-15 09:46:51 +07:00
dab246 ec75bb3cab TF-4136 Add config Sentry 2026-01-15 09:46:51 +07:00
dab246 ad768f1552 TF-4223 Fix welcome email is not well displayed 2026-01-12 05:16:02 +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
Dang Dat 060416292f fixup! TF-4224 Reduce ReDoS vulnerability 2026-01-06 10:16:26 +07:00
Dang Dat b4fdc55a07 fixup! TF-4224 Reduce ReDoS vulnerability 2026-01-06 10:16:26 +07:00
Dang Dat 7b8e95de9a fixup! TF-4224 Reduce ReDoS vulnerability 2026-01-06 10:16:26 +07:00
Dang Dat 9f1373c7e5 fixup! TF-4224 Reduce ReDoS vulnerability 2026-01-06 10:16:26 +07:00
Dang Dat 782d21d796 fixup! TF-4224 Reduce ReDoS vulnerability 2026-01-06 10:16:26 +07:00
Dang Dat 8e0276114e fixup! TF-4224 Reduce ReDoS vulnerability 2026-01-06 10:16:26 +07:00
Dang Dat 3d08fc9e5f fixup! TF-4224 Reduce ReDoS vulnerability 2026-01-06 10:16:26 +07:00
Dang Dat a8f90ec700 fixup! TF-4224 Reduce ReDoS vulnerability 2026-01-06 10:16:26 +07:00
Dang Dat 86dec27d67 fixup! TF-4224 Reduce ReDoS vulnerability 2026-01-06 10:16:26 +07:00
Théo Poizat e7405051d1 fixup! Use html parser instead of regex to clean composer input
Improve efficiency and add more tests in convertHtmlContentToTextContent
2025-12-19 19:03:39 +07:00
Théo Poizat a9cfe86a59 Use html parser instead of regex to clean composer input
Before sending input to the LLM, we clean the composer input to
remove html tags. We relied on regex that we not complete enough and
could be bypassed easily. So let's use the html parser available in
Dart instead.

I also added some tests.
2025-12-19 19:03:39 +07:00
dab246 d6e959c4d9 TF-4145 Create paywall url from workplaceFqdn 2025-11-17 14:24:30 +07:00
dab246 14ab5352a3 TF-4145 Use generateWebLink for paywall url 2025-11-17 14:24:30 +07:00
dab246 8b5fb2f030 TF-4145 Add generateWebLink and safeGenerateWebLink with FQDN validation 2025-11-17 14:24:30 +07:00
dab246 17b48d947b TF-4139 Add more test case for extractPlainText function 2025-11-12 13:36:55 +07:00
dab246 9600b169cc TF-4054 Add comprehensive tests for wrapPlainTextLinks 2025-10-13 13:21:56 +07:00
dab246 aa710113b0 TF-4054 Fix link detection 2025-10-13 13:21:56 +07:00
dab246 1f83484998 TF-4009 Display a attachment reminder warning modal 2025-09-16 11:04:26 +07:00
dab246 f9aa844d7e TF-4016 Add unit test for sanitize html with supress_time_adjustment tag 2025-09-16 09:36:33 +07:00
dab246 b91486be8e TF-3964 Fix text is not well displayed when preview email
Signed-off-by: dab246 <tdvu@linagora.com>
2025-08-22 11:19:11 +07:00
dab246 aeeb47a6f8 TF-3864 Support pasting multiple address with multiple format mixed
Signed-off-by: dab246 <tdvu@linagora.com>
2025-08-19 15:07:55 +07:00
dab246 f1ae5b58b2 TF-3864 Support pasting address with display name
Signed-off-by: dab246 <tdvu@linagora.com>
2025-08-19 15:07:55 +07:00
DatDang f86392c854 TF-3720 Thread Detail Collapse quote reply
Revert "fixup! TF-3720 Thread Detail Collapse quote reply"

This reverts commit 2104530977664f892702fba5e5bc6fb3e5768b19.

TF-3720 Thread Detail adjust receiver size

TF-3720 Thread Detail refactor email receiver alignment
2025-07-21 05:34:53 +07:00