Commit Graph
14 Commits
Author SHA1 Message Date
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
Đặ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
Dat H. Pham 0210c5dfc5 TF-4861 Test LocalizedFileSizeFormatter with Intl.defaultLocale 2026-09-29 16:30:57 +07:00
Benoit TELLIERandClaude Opus 5.5 97baa1e0b7 TF-4861 Localize storage size units and decimal separator
Quota sizes in storage settings were formatted with the filesize package,
which always uses English units and a decimal point. Format them with the
current locale's decimal separator and French byte units (o, Ko, Mo, Go...),
and pluralize 'utilisés' in the French translation.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-29 16:30:57 +07:00
Dat H. Pham 285e926a0d fix: InvalidStateError in IndexDatabase prevent state be updated (#4717) 2026-07-27 14:06:54 +07:00
Dat H. Pham 73ecd810dd fix: route parameterized vCard MIME types to file share, not body
text/x-vcard shares carrying MIME parameters (e.g. ";charset=utf-8") or
different casing failed the exact-match check and fell into the content
branch, pasting a raw .vcf file path into the composer body instead of
attaching the contact. Normalize the MIME type (strip parameters, trim,
lowercase) before matching.

Expose the share handler as visibleForTesting and add controller tests for
vCard / text-plain / text-html routing, plus manager coverage that an
EventChannel error is swallowed and later shares still deliver.
2026-07-07 14:50:51 +07:00
Dat H. Pham 52e418934d fix: keep share manager subject open across dashboard teardown
Dashboard onClose closed the singleton EmailReceiveManager's BehaviorSubject.
After a close/reopen cycle (logout/login, route recreation) the next dashboard
subscribed to the dead subject; a later live share then landed on a freshly
recreated subject the listener never subscribed to, so the composer never
opened. Clear pending data by emitting an empty list instead of closing, so
the subject lives for the singleton's lifetime and keeps delivering shares.
2026-07-07 14:50:51 +07:00
Dat H. Pham 43e99d9170 fix: prevent empty initial-media result from clobbering a live share
Subscribe to the live media stream before resolving getInitialMedia, and
apply the cold-start result only when non-empty. A share can land on the
live EventChannel before getInitialMedia resolves; on a normal (non-share)
launch getInitialMedia returns empty, so applying it unconditionally
overwrote the just-arrived share — silently dropping warm-app shares that
land while startup is still settling.

Also add onError/catchError logging to both media sources and a
deterministic regression test that gates getInitialMedia behind a Completer
to reproduce the race.
2026-07-07 14:50:51 +07:00
Dat H. Pham e9b74126cc fix mailto handling 2026-07-07 14:50:51 +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 1c7778d6cc TF-4124 Add unit test for isValidEmail and isEmailLocalhost 2025-10-28 16:44:19 +07:00
dab246 3c5b0d9da4 Replace "!is" with "is!" 2024-09-13 17:44:11 +07:00
HuyNguyen 880c41b721 TF-1677: Add test case
(cherry picked from commit c0fa82c8f9)
2023-05-08 13:03:51 +07:00