Commit Graph
671 Commits
Author SHA1 Message Date
Jordi Mallach a863283680 feat(web): add optional Content Security Policy
AngularJS (EOL since 2022-01) and AngularJS Material no longer receive
security fixes, so any new vulnerability in them will stay unpatched.
In AngularJS, templates are code: any attacker-controlled text that
ends up in a compiled template is evaluated as an expression, and
since 1.6 there is no expression sandbox, so a single
{{constructor.constructor('...')()}} gives full script execution.
SOGo renders untrusted data (mail bodies, invitations, attachment
names, contact fields) into such templates and currently relies on
server-side filtering, like stripping "{{" and "}}", to prevent this.
Any gap in that filtering, or a bypass of $sanitize/ng-bind-html,
would mean XSS in the webmail session: reading and sending mail as
the user, and access to calendars and contacts.

A Content Security Policy adds a second layer in the browser that
doesn't depend on catching every injection. The new
SOGoContentSecurityPolicy system default ("report-only" or "enforce",
disabled when unset) sends a strict policy with the pages of the web
interface:

  script-src 'self' 'nonce-<random>'   (no 'unsafe-inline'/'unsafe-eval')
  style-src 'self' 'unsafe-inline'     (Angular Material, CKEditor 5)
  object-src 'none'; base-uri 'self'; frame-ancestors 'self'; ...

The policy is generated by sogod, since a fresh 128-bit nonce is needed
per response: it is shared by all components of the response and set
on the inline configuration scripts of the page frame and module views.
The page also gets ng-csp="no-unsafe-eval", so AngularJS evaluates
expressions with its interpreter instead of Function().

With the policy enforced, an expression injected into a compiled
template, such as {{constructor.constructor('...')()}}, can no longer
reach Function() and fails with an EvalError, and injected inline
scripts are blocked. Injected expressions are limited to calling
functions available on the scope.

Tested with Chromium in both modes on login, Mail (HTML messages,
remote content, invitations, compose), Calendar and Contacts editors,
Preferences and Administration: no violations from SOGo's own code.
With the default unset, the generated output is unchanged.

form-action is deliberately not restricted, so SAML2/CAS/OpenID
logins posting to an external IdP keep working. Scripts listed in
SOGoUIAdditionalJSFiles are served from WebServerResources and allowed,
but must not load scripts from other origins, use eval() or rely on
inline handlers; their dependencies have to be installed and listed
alongside them.
2026-11-06 16:22:03 +01:00
Hivert Quentin 3f4f949664 feat(junk): add junk action on mail view 2026-09-04 18:13:36 +02:00
Hivert Quentin 29d0bbc9eb fix(mail): render properly the subject v2 2026-05-03 16:57:25 +02:00
smizrahi f65ab9b43a feat(mail): Add move to icon on the mail view. Closes #6028. 2024-11-25 15:32:34 +01:00
smizrahi 2258d5cd60 feat(mail): Add sort by recipient instead of from in sent folder. Change subject_or_to in sent folder for search instead of subject_or_from. Closes #6030. 2024-11-25 12:01:46 +01:00
smizrahi 6f86506b28 feat(mail): Deletion of mail older than x. Closes #6023. 2024-11-20 16:50:15 +01:00
smizrahi 0cbd082c1d fix(mail): Fix highlighsearch html rendering on subject 2024-09-04 18:03:36 +02:00
smizrahi ed951667ec feat(mail): Improve mail search (advanced search) 2024-07-02 11:12:54 +02:00
smizrahi f621d97289 feat(mail): Improve mail search (advanced search) 2024-07-01 12:56:31 +02:00
smizrahi 6ac8525bfe feat(mail): Add 'View raw message' mail contextual option. This option open message in a popup without HTML mail CSS content modification. 2024-05-22 10:15:58 +02:00
smizrahi 9eb8039698 feat(mail): Improve mail search (advanced search) 2024-05-21 09:25:20 +02:00
smizrahi e92fb8f52d feat(core): Update to ckeditor 5. Fixes #5920. 2024-02-27 14:29:59 +01:00
Hivert Quentin d0b4b50456 feat(core): add SOGoDisableExport option to disable export for mail, calendar and contacts 2023-11-03 18:20:12 +01:00
Hivert Quentin 5534d4b6ee fix(notification): body was not send + missing tooltip 2023-09-13 14:52:08 +02:00
smizrahi a48440754c fix(ui): Disable send button while mail is sending. Fixes #5825. 2023-07-10 11:22:08 +02:00
Hivert Quentin e53e5493c6 style(UX): add missing tooltips 2023-07-07 17:35:32 +02:00
smizrahi ab954a150e fix(mail): Fix email without subject according to RFC 2822. Fixes #5743 2023-05-22 18:23:28 +02:00
smizrahi 0a9b3d6adf feat(mail): Add punycode (RFC 3492) to encode domain with special characters 2023-03-21 10:19:32 +01:00
smizrahi 435495f007 feat(core): Add SOGoDisableSharing option to disable sharing for mail, contacts and calendar 2022-12-12 12:03:59 +01:00
Francis Lachapelle a40d3b6296 fix(mail): remove unused directive in mail editor 2022-05-17 21:13:50 -04:00
Francis Lachapelle 47c629f13c chore(mail): remove UIxMailFolderMenu.wox 2022-05-16 17:43:35 -04:00
Francis Lachapelle dd0730947f web: update window title depending on active module
Fixes #4982
2022-05-16 17:43:35 -04:00
Francis Lachapelle 96d00b744e fix(mail(web)): display emails extracted from smime certificate
Fixes #5440
2022-03-07 11:03:04 -05:00
Francis Lachapelle c476503d4a feat(mail(web)): forward multiple messages as attachments
Fixes #33
2022-02-18 17:05:25 -05:00
Francis Lachapelle c986422a3d feat(mail(web)): Templates folder for pre-defined drafts
To create a template, the user needs to:

 - define a mailbox as the Templates folder;
 - move a draft to this special folder.

Fixes #4320
Fixes #5363
2022-02-11 10:06:57 -05:00
Francis Lachapelle 7a776cd0b8 fix(mail(css)): highligh flagged/starred messages 2022-01-12 17:16:48 -05:00
Francis Lachapelle 93dff697e7 fix(mail(web)): display emails extracted from smime certificate
Fixes #5440
2021-12-10 14:33:10 -05:00
Francis Lachapelle 1786ec4d59 fix(mail(js)): ignore return key in input fields of editor
Fixes #4666
2021-12-09 17:31:56 -05:00
Francis Lachapelle 4eed98d58d feat(mail): delay or disable automatic mark message as read
Fixes #1585
2021-12-07 09:55:13 -05:00
Francis Lachapelle 1febace837 fix(web): add missing tooltips for expand/reduce buttons 2021-12-03 18:25:47 -05:00
Francis Lachapelle f9ed6391e6 fix(mail): allow to directly empty junk folder
Fixes #5224
2021-12-03 16:56:57 -05:00
Francis Lachapelle 37d06c6f21 fix(mail(js)): update list of labels when adding one to a message 2021-10-22 15:20:49 -04:00
Francis Lachapelle 800e21b05d feat(mail): filter messages by tags (labels)
Fixes #3323
Fixes #3835
Fixes #5338
2021-10-21 17:33:39 -04:00
Francis Lachapelle c2f95dc56a feat(mail): filter mailbox by flagged messages
Fixes #1417
2021-10-19 16:25:47 -04:00
Francis Lachapelle e5dbebb100 feat(mail): filter mailbox by unread messages
Fixes #1146
Fixes #3156
Fixes #4752
2021-10-19 14:49:50 -04:00
Francis Lachapelle 0eb452c412 fix(mail(js)): force search when restoring mailbox during navigation 2021-10-14 14:32:16 -04:00
Francis Lachapelle 08581eefab fix(mail): split "l" and "r" ACL attributes for IMAP mailboxes
Fixes #4983
2021-09-10 16:57:15 -04:00
Francis Lachapelle 2a8d64d891 fix(mail(js)): reload UIDs when changing sort order
Fixes #5385
2021-09-08 16:48:39 -04:00
Francis Lachapelle 145f221552 fix(mail(js)): fix height of mailboxes list items 2021-08-23 10:30:37 -04:00
Francis Lachapelle 86f08a2380 fix(mail(js)): show "Download all attachments" menu option 2021-08-19 17:15:12 -04:00
Francis Lachapelle eb46415711 fix(mail(js)): hide sign and encrypt options if not usable
When composing a message, don't offer to sign nor encrypt the message
if user has not uploaded a certificate or if S/MIME is disabled.
2021-08-12 13:40:47 -04:00
Francis Lachapelle ef5e7775cd feat(mail): download message as .eml file 2021-08-11 13:44:48 -04:00
Francis Lachapelle a9c6f09273 perf(mail(js)): various optimizations
We now use IMAP QRESYNC to synchronize mailbox.
2021-06-15 17:16:10 -04:00
Francis Lachapelle 66afbd2172 fix(mail(html)): add missing ARIA labels 2021-04-21 11:11:51 -04:00
Francis Lachapelle 0eae8296a3 fx(css): reduce list height of mailboxes
Fixes #5145
2020-11-16 12:15:08 -05:00
Dmitriy Alekseev 8642ff9d00 fix(mail): change default search scope to "subject or from" (#287) 2020-08-04 08:37:17 -04:00
Francis Lachapelle 8205acc5d5 feat(web): support desktop notifications, add global inbox polling
Fixes #1234, fixes #3382, fixes #4295
2020-07-29 16:31:19 -04:00
Francis Lachapelle 94efa4d7d4 fix(mail(css)): yellow flags for more visibility 2020-07-24 09:48:41 -04:00
Francis Lachapelle 9c391b8d8d fix(mail): use unique names for attachments
Fixes #5086
2020-07-23 12:56:35 -04:00
Francis Lachapelle 1579ebd233 chore: remove deprecated files and templates 2020-07-22 15:04:12 -04:00