Commit Graph
608 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 370a4a433c feat(acccount): Add read only account 2026-10-21 09:33:37 +02:00
Hivert Quentin aa7f82c09d fix(doc): typos 2026-09-14 17:28:06 +02:00
Hivert Quentin 012e6eff47 fix(junk): extend list of junk icon available 2026-09-14 10:56:28 +02:00
Hivert Quentin 04a3e98238 fix(pwd): use the proper url for reset password mail part2 2026-09-10 08:11:23 +02:00
Hivert Quentin f0c23407bf chore(sendmail): disable sendmail for now 2026-08-11 17:34:50 +02:00
smizrahi aefc14b265 feat(sogo-tool): add init-user command to create a user's personal folders and preferences without a login 2026-07-15 15:03:37 +02:00
Patrick Ben Koetter d99f020f82 chore(doc): Modernized Headings for easier editing (#370) 2025-08-08 10:45:12 +02:00
Hivert Quentin 8290cf2859 chore(doc): add doc por api 2025-06-25 14:16:17 +02:00
Hivert Quentin 1a6f2825b6 chore(foc): put a link to the community version 2025-06-11 13:52:36 +02:00
Hivert Quentin c5fb3482e2 fix(openid): make end_session_endpoint optional 2025-05-13 16:03:13 +02:00
Chris 4ec3d2091a fix(typo): Fix typo 'attachements' (#367)
* fix: Fix typo 'attachements'
* fix: Use original translation key for typo fix
2025-04-29 14:50:29 +02:00
Slávek Banko 4a68909060 feat(calendar): Make the Jitsi meeting room prefix configurable
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
2025-03-31 21:03:47 +02:00
Hivert Quentin a1f2670485 revert: feat add url for creating account on login page 2025-03-13 15:47:16 +01:00
Hivert Quentin c3234882eb feat(openID): second part with a lot of fixes and cleaning 2025-03-13 15:25:56 +01:00
Hivert Quentin 458d39d48a feat(openID): first stable version 2025-03-13 15:24:03 +01:00
y9048a 02dd5c3501 feat(mail) Introduce option SOGoVacationAllowZeroDays to allow a sieve vacation days value of 0 2025-02-11 17:17:58 +01:00
Hivert Quentin 9f4f48a44f feat(calendar): Can defined the Jitsi server url for meeting created 2025-02-03 14:19:02 +01:00
Hivert Quentin 42c227beca feat(calendar): Can now create Jitsi link when making event 2025-01-27 14:27:09 +01:00
smizrahi ea427ea41a feat(mail): Deletion of mail older than x. Closes #6023. Remove also template folder. Change SOGoDisableMailCleaning to SOGoEnableMailCleaning (disabled by default). 2024-11-25 10:23:31 +01:00
Hivert Quentin ce86d14826 chore(tool): add the possibility to force the sieve script activation 2024-11-22 09:08:13 +01:00
smizrahi 6f86506b28 feat(mail): Deletion of mail older than x. Closes #6023. 2024-11-20 16:50:15 +01:00
smizrahi f2ba6870d5 feat(core): Add new SOGoURLCreateAccount option to add a create account link below login form 2024-10-22 16:03:50 +02:00
WoodySlum a466628126 Merge pull request #360 from robertsilen/patch-1
docs(core): add MariaDB to System requirements
2024-10-09 14:44:09 +02:00
Hivert Quentin 56598d1e37 feat(login): add parameters to prevent uneccesary connection request when the domain is unknown 2024-10-01 17:53:46 +02:00
robertsilen 160a464d63 add MariaDB 2024-08-15 16:34:55 +03:00
Robert Silén 17d85f84f7 add MariaDB to SOGoInstallationGuide.asciidoc 2024-08-10 09:45:47 +03:00
smizrahi a06331eb86 fix(doc): Fix typo with SOGoURLEncryptionEnabled in documentation 2024-07-11 16:48:21 +02:00
smizrahi 0168ca56b2 feat(core): Add MySQL/MariaDB SSL connection support 2024-06-05 11:30:40 +02:00
smizrahi 6b514bb159 chore(packaging): Add Ubuntu 24.04 (Noble Numbat) 2024-05-22 10:55:33 +02:00
smizrahi 98e00d09a3 feat(core): Update to ckeditor 5. Fixes #5920. Add SOGoForceRawHtmlSignature to disable raw-html-embed. Removed CKEditor signature box style when composing mail. Fix issue where raw-html-embed was added when changind signature 2024-04-08 10:37:33 +02:00
Hivert Quentin 96331cac90 feat(mail): add options to not add X-Foward header in mail 2024-03-07 15:36:40 +01:00
smizrahi 185770a35e docs(installation): Improve documentation on 5.10.1 2024-02-28 16:56:22 +01:00
smizrahi fd9b8dcfcd fix(core): Add disableSubgroups option in SOGoUserSources LDAP settings to avoid infinite recursive loop when using a group name with the same name as a member. Fixes #5913 2024-02-28 11:08:51 +01:00
smizrahi 4dba56f70d fix(addressbook): Removed SOGoGlobalAddressBookFirstEntries (use listRequiresDot instead) and move SOGoGlobalAddressBookFirstEntriesCount to globalAddressBookFirstEntriesCount in source scope. This fixed the broken listRequiresDot in 5.10 2024-02-26 15:40:49 +01:00
Hivert Quentin 2aec2ec7b0 doc(secret): Add documentation for the sogo secret 2024-02-20 09:37:13 +01:00
Hivert Quentin a6319e1689 fix(crypto): add protections for decryption 2024-02-09 16:16:19 +01:00
Hivert Quentin e6bfab7ee1 feat(accounts): Add parameter to encrypt/decrypt auxiliary account's password 2024-02-01 16:55:41 +01:00
smizrahi 9560bdcf0c fix(docs): Fix typo in documentation 2024-01-22 14:53:19 +01:00
smizrahi eee50697b0 feat(core): Add message of the day 2024-01-22 14:34:22 +01:00
smizrahi 9e3e3b2291 fix(mail): Fix inline pdf attachement issue when Hide inline attachment option is set. Now the option hides only inline images 2024-01-17 17:57:33 +01:00
smizrahi a6fc83c35b fix(mail): Fix inline pdf attachement issue when Hide inline attachment option is set. Now the option hides only inline images. 2024-01-17 10:06:19 +01:00
smizrahi 26b14671f5 fix(password recovery): Add default from mail parameter 2024-01-09 10:28:41 +01:00
smizrahi 10d789fb1f feat(core): Add URL encryption for GDPR compliancy 2023-12-22 11:33:40 +01:00
smizrahi d505b874f7 Merge branch 'master' into feature-gdpr 2023-12-20 18:01:40 +01:00
smizrahi 17eca6f96a feature(contact): Show 100 first results for global address book 2023-12-18 08:34:53 +01:00
Andras Kovacs 669dcaa242 update documentation url 2023-12-05 14:38:11 +01:00
Hivert Quentin 2e670f7e62 feat(mail): Add an option in Preferences to display full email instead of name alone in mailboxes 2023-11-23 14:09:57 +01:00
Hivert Quentin bb943e414d fix(sogo-tool): add protection to expire-sessions if the input is not an integer 2023-11-17 15:50:41 +01:00
Hivert Quentin c872fb4d9c feat(preferences): can set SOGoForwardConstraints to 3 to accept both internal and external domains from SOGoForwardConstraintsDomains 2023-11-10 15:07:14 +01:00