Commit Graph
230 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
smizrahi 2756176503 fix(calendar): Fix empty recurence list when creating event from mail 2024-06-03 22:41:42 +02:00
smizrahi e92fb8f52d feat(core): Update to ckeditor 5. Fixes #5920. 2024-02-27 14:29:59 +01:00
Hivert Quentin f8b7986501 fix(template): wrong ending tag 2023-11-04 11:32:17 +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
smizrahi a273f7aca5 feat(core): Add mobile provisioning download for Apple's devices. Update translations (incompatible icon under windows) 2023-10-31 12:10:05 +01:00
smizrahi 6d16ee7988 feat(core): Add mobile provisioning download for Apple's devices 2023-09-27 17:28:29 +02:00
Hivert Quentin e53e5493c6 style(UX): add missing tooltips 2023-07-07 17:35:32 +02:00
smizrahi 3b0fbdd4f4 fix(js): Fix JavaScript error when send mail from Addressbook. Fixes #5750. 2023-04-24 09:41:21 +02:00
adetk 5e8a4b4034 Merge branch 'Alinto:master' into master 2022-12-24 16:57:31 +06:00
smizrahi 435495f007 feat(core): Add SOGoDisableSharing option to disable sharing for mail, contacts and calendar 2022-12-12 12:03:59 +01:00
Adet Kineyev d1401e3bfc i18n(ru): Date specific Russian from and to translations 2022-08-19 09:22:56 +06:00
Francis Lachapelle dd0730947f web: update window title depending on active module
Fixes #4982
2022-05-16 17:43:35 -04:00
Francis Lachapelle 2f725a3f2d feat(calendar): search for past events and tasks
Fixes #5441
2022-04-28 13:47:02 -04:00
Francis Lachapelle 73797761c3 fix(calendar(js)): show real selected list in print preview 2020-07-24 10:57:24 -04:00
Francis Lachapelle 6e2d652e38 fix(web): restore menu separators in sidenav of Calendars & Mailer 2020-07-14 14:32:13 -04:00
Francis Lachapelle 07c06db69d refactor(mail(js)): replace ckEditor directive by sgCkeditor component
This refactoring

 1. simplifies updating the CKEditor source code;
 2. allows many instances of the CKEditor on the same page;
 3. fixes the cursor positioning on focus.
2020-05-15 11:37:56 -04:00
Francis Lachapelle f6ca946058 fix(calendar): don't allow RDATE unless already defined
Since RDATE are not properly supported in EAS, hide the possibility to
specify recurring dates unless the component being edited already
contains RDATE(s).
2019-10-30 11:04:59 -04:00
Francis Lachapelle 2b27745a00 Allow import to writable calendar subscriptions 2019-10-02 09:15:25 -04:00
Francis Lachapelle 1641235163 (i18n) Add missing localizable strings 2019-09-05 10:20:41 -04:00
Francis Lachapelle 6e040e418b (js/css) Fix rendering of material icons 2019-07-05 16:35:20 -04:00
Francis Lachapelle da76344983 (js) Keep center list visible on xs screen
For Calendar module.
2019-03-19 11:30:28 -04:00
Francis Lachapelle 03716f3c3e (css) Fix printing of long mails
Fixes #3731
2019-01-08 15:25:25 -05:00
Francis Lachapelle 62a8414090 (css,js) Dynamic CSS for printing calendars
Initial commit. Fixes #3768
2018-12-17 22:15:26 -05:00
Francis Lachapelle e4f6be243e (js) Export calendar subscriptions
Fixes #4560
2018-10-09 14:00:19 -04:00
Francis Lachapelle 563a4c7d1e (css) Truncate lists subheader 2018-05-16 11:58:35 -04:00
Francis Lachapelle 12b2ecca72 Show current ordering setting in lists 2018-05-07 16:43:16 -04:00
Francis Lachapelle 71d48dd6b5 (js) Fix renaming a folder under iOS 2018-05-07 10:14:04 -04:00
Ludovic Marcotte fbed929402 (feat) now possible to show events/task for the current year 2018-03-21 13:44:39 -04:00
Francis Lachapelle 3bf55a5edf (js) Improve handling of Web calendars 2018-02-07 15:36:54 -05:00
Francis Lachapelle de91b57825 Fix handling of public access rights of Calendars
Fixes #4344
2017-12-18 15:31:43 -05:00
Francis Lachapelle 77f9f60276 New events list view 2017-09-08 13:35:31 -04:00
Francis Lachapelle 02cbe23e78 (js) New sgCalendarListItem component 2017-09-01 12:35:38 -04:00
Francis Lachapelle e8ec8180a8 (js) Use more one-time bindings in Calendar module 2017-06-22 11:56:16 -04:00
Francis Lachapelle b6b8f7a0fb Improve display of component comments, card notes 2017-06-14 20:41:18 -04:00
Francis Lachapelle f2af5e9f87 Improve display of tasks status 2017-05-19 12:13:01 -04:00
Francis Lachapelle d90533399d (css) Keep the fab button visible 2017-02-01 21:33:17 -05:00
Francis Lachapelle 936b21b8c0 (css) Fix glitches in Month view with Firefox 2017-01-16 16:30:24 -05:00
Francis Lachapelle 4c78d81bf7 Formatting & Comments 2016-12-19 11:15:35 -05:00
Francis Lachapelle 52cdb71d1f Add sort by start date for the tasks list
Fixes #3840
2016-11-30 12:13:48 -05:00
Francis Lachapelle 5211e339fb (js,html) Use md-switch in Calendars list 2016-11-22 09:57:39 -05:00
Francis Lachapelle 99b00254c5 (js) Persistent state of center list in Calendars
Fixes #3861
2016-11-21 16:24:54 -05:00
Francis Lachapelle ceb626638e (js) Improve tooltips of calendars list (sidenav) 2016-11-17 15:52:21 -05:00
Francis Lachapelle 2f69c018be (css,js) Update md to v1.1.1-master-d774b76 2016-11-17 15:42:14 -05:00
Francis Lachapelle 0705f8f365 (html) Can't export a calendar subscription 2016-11-17 12:09:57 -05:00
Francis Lachapelle 6e48734504 Allow to hide center column on large screens 2016-11-10 16:04:29 -05:00
Francis Lachapelle 7c02b4bf88 (js) Disable submit btn while saving event or task
Fixes #3880
2016-11-04 14:29:54 -04:00
Francis Lachapelle 81ff9e7f04 (css,js) Update md to v1.1.1-master-70cecda 2016-11-01 15:54:56 -04:00
Francis Lachapelle 1ee7693432 Fix support for recurrent tasks (cont'd)
Fixes #3864
2016-11-01 14:52:18 -04:00
Francis Lachapelle 1c689719ac (html) Add missing options to subscribed calendars
Fixes #3863
2016-11-01 12:09:08 -04:00