15 Commits
Author SHA1 Message Date
c72f5421c2 TF-5099 Prevent StringConvert from corrupting plain entries matching (#5141)
* TF-5099 Prevent StringConvert from corrupting plain entries matching Base64 and URL patterns

- Only decode Base64 strings when decoded output contains '@' and raw input does not
- Wrap Uri.decodeComponent in try-catch to preserve addresses with literal '%'
- Add regression tests in string_convert_test.dart

* refactor: extract _decodeInputIfNeeded to reduce cognitive complexity

* TF-5099 Cover percent and base64 address extraction with more tests

* Update core/lib/utils/string_convert.dart

Co-authored-by: Dat Vu <datx1995@gmail.com>

* refactor: flatten URL decode condition and add regression test for percent-escaped addresses

* TF-5099 Cover invalid percent and partial-encode address pins

* TF-5099 Pin behavior for mixed and quoted partially encoded addresses

---------

Co-authored-by: Dat H. Pham <dphamhoang@linagora.com>
Co-authored-by: Dat Vu <datx1995@gmail.com>
Co-authored-by: dab246 <80730648+dab246@users.noreply.github.com>
2026-11-17 05:23:19 +07:00
Dat Dang 5807b75604 2509 Sanitize composer reply/forward, mailto and pasted content (#5069) 2026-10-29 15:15:29 +07:00
Dang Dat a8f90ec700 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 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
dab246 51c95bbc69 Upgrade hive database version to 14
Signed-off-by: dab246 <tdvu@linagora.com>
2025-04-08 23:43:53 -07:00
dab246 868ec1bc8e Check if text is a table (Markdown or ASCII art format) when email content is text/plain
Signed-off-by: dab246 <tdvu@linagora.com>
2025-04-08 23:43:53 -07:00
dab246 998ff1972e TF-3539 Support separator list email with space character
Signed-off-by: dab246 <tdvu@linagora.com>
2025-03-10 21:24:20 -07:00
dab246 36a9117e00 Fix cannot auto create tag when paste list email and switch focus
Signed-off-by: dab246 <tdvu@linagora.com>
2025-03-10 21:24:20 -07:00
dab246 b78aea6103 TF-3514 Add unit test for getMediaTypeFromBase64ImageTag method
Signed-off-by: dab246 <tdvu@linagora.com>

Signed-off-by: dab246 <tdvu@linagora.com>
2025-03-10 03:02:19 -07:00
dab246 223fdbf1fb TF-3278 Handle open app via deep link at MailboxDashboard screen 2025-02-05 03:00:08 -08:00
DatDang ac91cae0db TF-3267 Implement HTML attachment preview 2025-02-05 03:00:08 -08:00
dab246 68b9291e68 TF-3344 Handle separator when pasting list of mail addresses 2025-02-05 03:00:08 -08:00