Commit Graph

1693 Commits (eb18249d2b66d69356c8d59b99fac2cc74c27d27)

Author SHA1 Message Date
Francis Lachapelle cddfac82dd Revert "Revert "Revert "fix(core): added back instance caching for LDAP members"""
This reverts commit 056004bca1.
2020-06-09 15:15:06 -04:00
Francis Lachapelle cb08abfa67 Revert "fix(core): avoid caching group members per instance"
This reverts commit 0ff0d43e1e.
2020-06-09 15:14:47 -04:00
Nicolas 27840093f5
feat(core): add lookupFields attribute in LDAP source
This field allows for looking up attributes not returned with the
default query, such as operational attributes.

Fixes #568

Co-authored-by: Skrupellos <skruppy@onmars.eu>
2020-06-09 11:52:07 -04:00
Johannes Kanefendt 9534816a21 Fixed some header comments 2020-06-09 13:55:08 +02:00
Johannes Kanefendt b951c72451 Use libzip API for creating ZIP archives instead of zip command line tool 2020-06-09 13:50:29 +02:00
Ludovic Marcotte 0ff0d43e1e fix(core): avoid caching group members per instance 2020-06-08 10:26:33 -04:00
Ludovic Marcotte 056004bca1 Revert "Revert "fix(core): added back instance caching for LDAP members""
This reverts commit ca5df1a153.
2020-06-08 09:53:44 -04:00
Francis Lachapelle ca5df1a153 Revert "fix(core): added back instance caching for LDAP members"
This reverts commit b94175cc0c.
2020-06-04 16:13:45 -04:00
Ludovic Marcotte b94175cc0c fix(core): added back instance caching for LDAP members 2020-06-03 14:53:26 -04:00
Ludovic Marcotte 9f55cdc725 fix(core): added even better debugging for bogus groups 2020-06-03 07:46:57 -04:00
Nicolas Höft fc863bf63f fix: Fix for failing test in NSString+Utilities
The test in TestNSString+Utilities would otherwise fail:

======================================================================
FAIL: test_countOccurrencesOfString (TestNSString+Utilities.m:46)
----------------------------------------------------------------------
assertion failure

Simply leave the loop early if the substring length is zero to
avoid this issue
2020-06-03 08:17:08 +02:00
Nicolas Höft 2e0fc3ca09 feat(core): Add PBKDF2 support
Extend NSData+Crypto to support PBKDF2 with SHA1 HMAC as dovecot
is using it since v2.3.0.

The format hashed passwords is {PBKDF2}$1$<salt>$<rounds>$<hashed value in hex>

The implementation of pkcs#5 PBKDF2 is taken from openbsd (with minor
adjustments) as OpenSSL and GnuTLS would require quite new versions to
support this hash.
2020-06-03 08:17:08 +02:00
Ludovic Marcotte 42587f7422 fix(core): improved debugging on bogus groups 2020-06-02 15:05:54 -04:00
Ludovic Marcotte 5b6096e32c fix(core): improve debbuging when dealing with groups 2020-05-26 09:25:25 -04:00
Ludovic Marcotte e37ae5fec5 fix(core): disable ASM version of blowfish on i386 2020-05-21 08:51:56 -04:00
Extra Fu 30c0d8a425
Merge pull request #272 from the-nic/feat/blowfish
Add BLF-CRYPT password scheme support
2020-05-15 19:12:44 -04:00
Nicolas Höft 789b55c274 NSData+Crypto: add password verification function
This will allow for using specific verification, depending on the
scheme.
2020-05-15 22:53:15 +02:00
Ludovic Marcotte 798ad1502c fix(core): adjust syntax for Python > 2 2020-05-15 12:45:20 -04:00
Nicolas Höft c3a4f4aeb4 fix(core): NSData+String: Simplify generateSalt function
Instead of converting binary data to base64 in order to get printable
data, use a white list of characters allowed and select from those.

This also makes sure we will get the right amount of characters as
requested, not potentially longer strings.
2020-05-15 07:43:38 +02:00
Nicolas Höft 8c612fc0a2 feat(core): Add BLF-CRYPT scheme.
Dovecot promotes the use of BLF-CRYPT as a hashing scheme [1].
However, as not all libc-crypt() implementations support this scheme,
use the implementation added in a previous commit.

Also, update the references to the dovecot implementation and a small
test case for testing the blowfish implementation.

[1] https://doc.dovecot.org/configuration_manual/authentication/password_schemes/

Fixes #4958
2020-05-15 07:43:38 +02:00
Nicolas Höft 562f81f21f fix(core): NSData+String: Dont mix tabs and spaces 2020-05-15 07:43:38 +02:00
Nicolas Höft 3040c275d8 feat(core): Add blowfish implementation from openwall
Using version 1.3, see https://www.openwall.com/crypt/
2020-05-15 07:43:38 +02:00
Nicolas Höft 589cfaa2f4 feat(core): Support smtps and STARTTLS for SMTP
Support uri schemes for SMTP, enabling STARTTLS and SMTPS for SMTP
connections.

The new format for configuration value SMTPServer supports passing a
URI scheme (either smtp:// or smtps://). To support old configurations,
if no scheme is given, smtp:// is assumed.

Fixes #31
2020-05-14 08:47:05 +02:00
Ludovic Marcotte f78300a12e feat(core): initial Google Authenticator support for 2FA 2020-05-07 07:22:24 -04:00
Francis Lachapelle 7b5c787718 fix(core): LDAP group expansion must use all user sources 2020-05-05 12:18:37 -04:00
Francis Lachapelle 5da7903ce1 chore(tool): fallback to NGImap4ConnectionStringSeparator
When using a master user to update the Sieve scripts through sogo-tool,
we may not be able to detect the IMAP delimiter. Therefore, we must
fallback to the default NGImap4ConnectionStringSeparator.

Fixes #4919
2020-05-05 10:53:02 -04:00
Francis Lachapelle 8f7b2bfbed fix(core): LDAP group expansion must use all user sources 2020-05-04 12:25:16 -04:00
Francis Lachapelle 979e1342c7 docs: fix wrong default values for MailComposeMessageType and LoginModule
Fixes #4992
2020-04-06 15:38:45 -04:00
Extra Fu 62823815a7
Merge pull request #263 from jkanefendt/revise-group-expansion
Revision of the group member expansion interface
2020-04-02 09:52:21 -04:00
Ludovic Marcotte f0980a9cbd feat(core): Added AES-128-CBC password scheme for SQL authentication.
This allows SOGo to use Plesk's database as an authentication source.
2020-01-06 15:47:47 -05:00
Francis Lachapelle c1ccbae316 style(obj-c): replace tabs by spaces 2019-12-17 11:15:50 -05:00
Francis Lachapelle 7180b5988d fix(preferences): improve error handling with Sieve server 2019-12-16 14:54:03 -05:00
Johannes Kanefendt 948c89f5bb - Respect the user domain when dealing with groups
- Renamed protocol MembershipAwareSource to SOGoMembershipSource
2019-12-04 10:37:08 +01:00
Francis Lachapelle 3bb40e4024 fix(calendar): adjust invalid dates when importing a vEvent
Fixes #4845
2019-11-27 17:00:28 -05:00
Johannes Kanefendt 278d4ab4cb Return NSDictionary contact entries from [MembershipAwareSource membersForGroupWithUID] instead of SOGoUser objects.
Optimization for user sources that are capable of fetching lists of group members at once, might save a lot of expensive SOGoUser lookups.
2019-11-26 22:20:28 +01:00
Johannes Kanefendt 2e98929900 Removed tight coupling of group membership expansion and LDAPSource.
Any implementation of SOGoSource may now support group expansion by implementing the protocol MembershipAwareSource.
2019-11-26 15:29:02 +01:00
Francis Lachapelle 5b3d84ee24 refactor(preferences): conditionally activate the Sieve script
All the user defaults are now editable through the Preferences module,
even if an external Sieve script is enabled. However, the user can
disable the external Sieve script and force the activation of the
"sogo" Sieve script.
2019-11-15 14:37:35 -05:00
Ludovic Marcotte 2bc24eca82 fix(core): don't disable the current script if we aren't doing anything 2019-11-07 15:27:43 -05:00
Ludovic Marcotte 3a8336484c chore(core): removed NSLog calls 2019-11-07 08:17:35 -05:00
Ludovic Marcotte 4475ac651d feat(core): allow pre/appended Sieve scripts
Allow domain admins to now set Sieve scripts that can be prepended
and appended to all users' scripts. This can now be controller
using the SOGoSieveScriptHeaderTemplateFile and
SOGoSieveScriptFooterTemplateFile domain defaults.
2019-11-06 14:53:30 -05:00
Ludovic Marcotte c2e7f6a866 feat(preferences): allow hiding of vacation the vacation period
This is controllable using the new SOGoVacationPeriodEnabled
domain defaults variable.
2019-11-05 15:33:16 -05:00
Ludovic Marcotte e866fd5fda (fix) fixed Apple Calendar creation (fixes #4813) 2019-10-28 14:39:39 -04:00
Ludovic Marcotte 34fcfe024b (fix) use the supplied Sieve creds to fetch the IMAP4 separator (fixes #4846) 2019-10-25 13:32:52 -04:00
Francis Lachapelle 0de722d8f4 Set default Sieve port to 4190
Fixes #4826
2019-09-25 10:54:35 -04:00
Francis Lachapelle 25021c192c New paramter SOGoLDAPGroupExpansionEnabled
Fixes #2506
2019-09-05 12:42:25 -04:00
Ludovic Marcotte 3187bca0ef (fix) now dynamically detect and use the IMAP separator (fixes #1490) 2019-09-04 13:45:53 -04:00
Ludovic Marcotte b68c9bd302 (fix) silence log call 2019-08-23 08:46:27 -04:00
Ludovic Marcotte 8c77145b9f (fix) avoid warning 2019-08-15 15:54:48 -04:00
Ludovic Marcotte 04f91b8948 (feat) now possible to specify which domains you can forward your mails to 2019-08-15 12:48:53 -04:00
Nicolas Höft f7f0af67d8 (fix) Fix SIGSEGV and compilation due to missing include crypt.h
When building on debian buster, the following warning occurs during
compiling:

    NSData+Crypto.m: In function ‘-[NSData(SOGoCryptoExtension) _asCryptedUsingSalt:magic:]’:
    NSData+Crypto.m:610:9: warning: implicit declaration of function ‘crypt’; did you mean ‘creat’? [-Wimplicit-function-declaration]
       buf = crypt([cryptString UTF8String], [saltString UTF8String]);
             ^~~~~
             creat
    NSData+Crypto.m:610:7: warning: assignment to ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
       buf = crypt([cryptString UTF8String], [saltString UTF8String]);
           ^
    NSData+Crypto.m: In function ‘-[NSData(SOGoCryptoExtension) asCryptUsingSalt:]’:
    NSData+Crypto.m:674:7: warning: assignment to ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
       buf = crypt([cryptString UTF8String], [saltString UTF8String]);
           ^
     Creating derived_src/NSFramework_SOGo.m..

This warning is apparently more severe as it may also cause segfaults
(at least on Debian Buster) when logging in, rendering sogo unusable:

    2019-07-21 11:27:55.623 sogod[16074:16074] MySQL4 connection established 0x0x55e6b9e56f40
    2019-07-21 11:27:55.624 sogod[16074:16074] MySQL4 channel 0x0x55e6b9aa41f0 opened (connection=0x0x55e6b9e56f40,sogo)
    2019-07-21 11:27:55.624 sogod[16074:16074] <MySQL4Channel[0x0x55e6b9aa41f0] connection=0x0x55e6b9e56f40> SQL: SELECT c_password FROM sogo_userview WHERE c_uid = 'xxxx';
    2019-07-21 11:27:55.625 sogod[16074:16074] <MySQL4Channel[0x0x55e6b9aa41f0] connection=0x0x55e6b9e56f40>   query has results, entering fetch-mode.
    Jul 21 11:27:56 sogod [16057]: <0x0x55e6b9a56020[WOWatchDogChild]> child 16074 exited
    Jul 21 11:27:56 sogod [16057]: <0x0x55e6b9a56020[WOWatchDogChild]>  (terminated due to signal 11)
    Jul 21 11:27:56 sogod [16057]: <0x0x55e6b992b360[WOWatchDog]> child spawned with pid 16268

The reason for this segfault is likely the implicit conversion to int,
leading to uninitialized higher bits of the pointer passed to NSData.
2019-07-21 12:00:21 +02:00
Francis Lachapelle f0c8aa884c (i18n) Add Indonesian (id) translation 2019-06-14 10:58:29 -04:00
Francis Lachapelle 0e918a446a Add rel="noopener" to external links
Fixes #4764
2019-06-10 13:20:44 -04:00
Ludovic Marcotte f57ff86951 (fix) fixed domain placeholder issue when using sogo-tool (fixes #4723) 2019-05-23 15:02:10 -04:00
Ludovic Marcotte 96bcbbdc14 (fix) consider DAVx5 like Apple Calendar (fixes #4304) 2019-03-21 14:08:44 -04:00
Francis Lachapelle fcdc4c92c0 Improve URLs/emails detection in text mail parts 2019-03-21 11:01:17 -04:00
Ludovic Marcotte 93f344bdbe added missing commit 2019-03-15 13:44:49 -04:00
Ludovic Marcotte 008e901ad6 (fix) we update the baseDN placeholders of all LDAP sources upon login 2019-03-15 13:35:12 -04:00
Ludovic Marcotte dad0be1815 (fix) make sure we keep a pristine version of the baseDN 2019-02-19 13:40:58 -05:00
Ludovic Marcotte bc456dcef8 (fix) fixed bad password login interval (fixes #4664) 2019-02-19 11:59:49 -05:00
Ludovic Marcotte d908468442 (fix) dynamic basdDN support for the top-level SOGoUserSources 2019-02-14 09:48:03 -05:00
Ludovic Marcotte d9943e559f (feat) baseDN now accept dynamic domain values (fixes #3685) 2019-02-04 07:37:56 -05:00
Ludovic Marcotte 8734ee7486 (fix) be a bit more verbose when session is expired 2018-11-09 13:50:13 -05:00
Francis Lachapelle 563a2cd9df Fix behaviour of return receipt actions 2018-09-13 10:05:17 -04:00
Francis Lachapelle 9ddb65a07a New button to reset Calendar categories
Also added default colors to categories.
2018-09-07 21:38:31 -04:00
Francis Lachapelle 3bdd90e2be Don't allow duplicate GCS folder names 2018-08-30 22:09:17 -04:00
Francis Lachapelle 828d773b49 Add security flags to cookies (HttpOnly, secure)
Fixes #4525
2018-08-21 14:02:01 -04:00
Francis Lachapelle 6020f6ae83 (i18n) Add Romanian (ro) translation 2018-07-30 12:05:14 -04:00
Francis Lachapelle c4c1de771c Minor code improvement in SQLSource.m 2018-07-06 12:40:43 -04:00
Francis Lachapelle 3eb01aef71 System address is the first user's addresses
In the preferences module, we don't save the user's custom email address
when it matches the system address. This address was considered the last
of all the user's email addresses, which is first, not intuitive, and
second, incorrect when composing a message since the first address is
used by default.

Fixes #3551
2018-07-06 10:28:22 -04:00
Francis Lachapelle 7bd4173388 Revert "Debugging output for subscription issue"
This reverts commit a0582c7e1e.
2018-06-27 15:39:19 -04:00
Francis Lachapelle 213ef0efb5 Revert "Debugging output for subscription issue"
This reverts commit 82d992fc67.
2018-06-27 15:39:18 -04:00
Francis Lachapelle 5fe44b2029 Revert "Debugging output for subscription issue"
This reverts commit fc6aafe4a6.
2018-06-27 15:39:16 -04:00
Francis Lachapelle b6ee4ee0db Revert "Debugging output for subscription issue"
This reverts commit c6e11606e9.
2018-06-27 15:39:14 -04:00
Francis Lachapelle aa41e6d868 Revert "Debugging output for subscription issue"
This reverts commit e33ec4e396.
2018-06-27 15:39:06 -04:00
Francis Lachapelle 821c846864 Revert "Debugging output for subscription issue" 2018-06-27 15:39:02 -04:00
Francis Lachapelle ef000c2ed1 Debugging output for subscription issue 2018-06-04 10:20:51 -04:00
Francis Lachapelle 0149d7400d (i18n) Add Japanese (ja) translation 2018-06-01 13:22:10 -04:00
Francis Lachapelle e33ec4e396 Debugging output for subscription issue 2018-05-30 12:01:08 -04:00
Francis Lachapelle c6e11606e9 Debugging output for subscription issue 2018-05-28 10:50:54 -04:00
Francis Lachapelle fc6aafe4a6 Debugging output for subscription issue 2018-05-25 08:49:34 -04:00
Francis Lachapelle 82d992fc67 Debugging output for subscription issue 2018-05-24 16:15:33 -04:00
Francis Lachapelle a0582c7e1e Debugging output for subscription issue 2018-05-18 11:19:18 -04:00
Ludovic Marcotte b0e59f9ac9 Revert "(fix) make sure to use crypt as the scheme for md5/sha256/sha512 (fixes #4137)"
This reverts commit 63cb80142b.
2018-04-27 08:55:13 -04:00
Ludovic Marcotte 511aa63a34 (fix) remaining S/MIME fixes to handle image/CIDs in HTML mails 2018-01-23 10:35:46 -05:00
Francis Lachapelle 15de264967 Web-based management of email certificate (cont'd) 2018-01-12 14:47:31 -05:00
Ludovic Marcotte 81e07f0105 (fix) cosmetics 2017-12-23 05:04:13 -05:00
Ludovic Marcotte 8f2bcb6055 (fix) cosmetics 2017-12-23 05:03:18 -05:00
Francis Lachapelle d526efa501 Remove null characters from JSON responses 2017-12-07 16:07:25 -05:00
Francis Lachapelle e8b29add3a Fix calls to fetchContactsMatching: 2017-11-22 09:28:34 -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 a2129f3e4a ModulesConstraints and listRequiresDot for SQL
SQL sources used for authentication can now have module constraints.
Entries of SQL sources used as address books can now be displayed
automatically.
2017-11-16 21:46:44 -05:00
Francis Lachapelle 38d4a26827 Avoid calls on null objects
Fixes #4329
2017-11-08 16:24:26 -05:00
Francis Lachapelle c7e9b0e3a6
Merge pull request #238 from drscream/fix/standard-macro
Fix standard visibility macro use
2017-10-27 15:24:36 -04:00
Francis Lachapelle 104ac2db33 New SOGoMailComposeWindow default 2017-09-20 16:50:41 -04:00
Francis Lachapelle 752323fb7d Add Simplified Chinese (zh_CN) translation 2017-09-05 12:10:46 -04:00
Francis Lachapelle ee7fdcba9f Improve cache cleanup when removing a group ACL 2017-08-29 15:13:15 -04:00
Francis Lachapelle c277c397e7 Remove duplicate key in SOGoDefaults.plist 2017-08-28 09:54:10 -04:00
Francis Lachapelle 399397bd79 Only discard mails if vacation conditions match
Fixes #4245
2017-08-23 14:14:45 -04:00
Thomas Merkel e35988e669
Fix standard visibility macro use
Expect crypt(3) to be provided by unistd.h, not the ancient crypt.h.
Update _XOPEN_SOURCE for SUSv3 / POSIX.1-2001
2017-08-21 18:09:39 +02:00
Ludovic Marcotte 2c9c1e0d01 (fix) support Squeeze + minor cleanups 2017-07-05 11:08:00 -04:00