* 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>
Summernote only binds Tab to list nesting when tabDisable is set, and even
then it inserts spaces. Register a keydown handler on the web editor that:
- delegates Tab / Shift+Tab inside a list item to the Summernote
indent / outdent commands (same as the toolbar buttons);
- outdents an empty nested list item on Enter instead of leaving the list,
like Gmail. Enter on an empty top-level item still exits the list.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The EML preview renders the mail content in the same document as the
app-generated header (subject, sender, recipients, date), so global mail
rules such as '* { font-family: ... !important }' restyled that header.
Wrap every mail <style> into '@scope (.email-body) { ... }'. A CSS
tokenizer neutralizes any '}' that would close the @scope block early,
honoring comments, strings, escapes and url() tokens, and drops the CSS
when unicode-range tokenization differs between browsers.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Links inside the EML preview opened new windows/tabs with plain
window.open, with no noopener and no scheme check. Pass
noopener,noreferrer and only open http, https and mailto targets.
Add ExternalLinkPolicy (http/https/tel allow-list) and route the mobile
email WebView's external-navigation handler through it, refusing the
app's own custom schemes so a link in received content can no longer
relaunch another app or the app itself.
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.