Commit Graph
263 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 e92fb8f52d feat(core): Update to ckeditor 5. Fixes #5920. 2024-02-27 14:29:59 +01:00
smizrahi 17eca6f96a feature(contact): Show 100 first results for global address book 2023-12-18 08:34:53 +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 65f8336255 feat(core): Add mobile provisioning download for Apple's devices. Fix shared calendar and contacts 2023-10-18 11:43:35 +02:00
smizrahi d38cc86d29 feat(core): Add mobile provisioning download for Apple's devices. Fix build issue 2023-09-28 09:18:43 +02: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
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 dd0730947f web: update window title depending on active module
Fixes #4982
2022-05-16 17:43:35 -04:00
Francis Lachapelle 72b5db4e35 fix(addressbook(js)): show copy option when source is remote 2020-07-24 10:42:22 -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 174b44ed50 fix(web(css)): truncate text of toolbar in multi-selection mode
Fixes #4623
2020-04-30 09:01:28 -04:00
Francis Lachapelle 6e040e418b (js/css) Fix rendering of material icons 2019-07-05 16:35:20 -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 3881bc408d (js) Fix condition of Copy action on cards 2018-08-31 15:59:34 -04:00
Francis Lachapelle 05e033ccb5 (js) Fix unsafe JS links
Fixes #4508
2018-07-11 14:04:23 -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 d05477499f (js) Always show center list when no card selected 2018-01-24 10:36:22 -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 eb90760b39 Use address books search fields in Contacts module
Searches can now be scoped to one or multiple fields. Those fields are
now dynamic and can be defined using SearchFieldNames in external
contacts sources (SQL and LDAP).
2017-11-21 15:56:16 -05:00
Francis Lachapelle 888adc9396 (js) Improve rename of address book
Fixes impossibility to insert spaces in address book name.
2017-10-10 14:29:38 -04:00
Francis Lachapelle 721428c88f (js) Create list from selected cards
Fixes #3561
2017-07-04 10:10:00 -04:00
Francis Lachapelle 8701d2c26c (js) Remove inline user settings for Contacts 2017-06-14 20:41:18 -04:00
Francis Lachapelle 0cc7c6be3d (js) Hide Copy/Move menu options with a single AB 2017-03-23 13:07:07 -04:00
Francis Lachapelle d90533399d (css) Keep the fab button visible 2017-02-01 21:33:17 -05:00
Steffen Müller ef4e311a5a Change Strings according to RFC 5322 2017-01-28 17:53:05 +01:00
Steffen Müller 621adb38c2 write using 'to', 'cc' or 'bcc' with string parameter
write to multiple selected contacts using 'to', 'cc' or 'bcc'
Feauture Request #3548
2017-01-27 16:37:13 +01:00
Steffen Müller 8efd01d55e write using 'to', 'cc' or 'bcc'
write to multiple selected contacts using 'to', 'cc' or 'bcc'
Feauture Request #3548
2017-01-26 18:29:07 +01:00
Francis Lachapelle 1375237697 (js) Don't allow to create a list in a remote AB 2016-12-19 12:07:17 -05:00
Francis Lachapelle 4c78d81bf7 Formatting & Comments 2016-12-19 11:15:35 -05:00
Francis Lachapelle 3bbd61cfd2 (js) Improve sgAvatarImage 2016-11-11 16:46:55 -05:00
Francis Lachapelle 6e48734504 Allow to hide center column on large screens 2016-11-10 16:04:29 -05:00
Francis Lachapelle ea64046df2 Fix links to newly added addressbook 2016-11-08 12:24:56 -05:00
Francis Lachapelle 81ff9e7f04 (css,js) Update md to v1.1.1-master-70cecda 2016-11-01 15:54:56 -04:00
Francis Lachapelle ad5fc5b91f Add missing options to subscribed addressbooks
Fixes #3850
2016-10-26 17:27:25 -04:00
Francis Lachapelle 37089e15c1 (html) Fix progress indicators of import dialogs 2016-10-17 12:06:13 -04:00
Francis Lachapelle 64434bbfad Fix sort by email with LDAP sources 2016-10-05 15:25:57 -04:00
Francis Lachapelle 1bd4fe5010 (js) Add hotkey to search in contacts 2016-10-03 11:44:51 -04:00
Francis Lachapelle ed7537d430 (html) Add missing ARIA labels 2016-08-30 17:49:17 -04:00
Francis Lachapelle 0c814e5050 (html) Optimize progress indicator in Contacts 2016-08-30 16:27:13 -04:00
Francis Lachapelle 098713537e Update Angular Material to version 1.1.0 2016-08-30 10:27:32 -04:00
Francis Lachapelle 4c9060abaa (css) Switch to md-scale for fab speed dials
.. until the "md-fling" effect gets fixed (speed dial is opened on
initialization).
2016-08-08 11:23:37 -04:00
Francis Lachapelle 907024d2c4 (js) Drag'n'drop of cards in AddressBook module
Required to add the option to move multiple cards to another
addressbook. Fixed the possibility to copy cards to a subscribed
calendar.
2016-08-05 16:08:04 -04:00
Ludovic Marcotte 2caa6754cf (fix) show tooltips over long calendar/ab names (fixes #232) 2016-06-17 15:41:10 -04:00
Francis Lachapelle ff4e50d904 (js) Use a speed dial for card/list creation 2016-06-10 15:05:35 -04:00