Skip to content

Commit

Permalink
feat(core): Add URL encryption for GDPR compliancy
Browse files Browse the repository at this point in the history
  • Loading branch information
WoodySlum committed Dec 22, 2023
1 parent d505b87 commit 10d789f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
13 changes: 5 additions & 8 deletions Documentation/SOGoInstallationGuide.asciidoc
Expand Up @@ -826,20 +826,17 @@ specified as an array of dictionaries.
|D |SOGoCreateIdentitiesDisabled
|Disable identity creation for users in preferences. If `YES`, users won't be able to add new identities and will allow to change only full name, signature and default identity. Default value is `NO`. Note : If this settings is set to `YES`, it will not be possible to crete auxiliary mail accounts.
<<<<<<< HEAD
|S |SOGoURLEncryptionEnabled
|Enable URL encryption to make SOGo GDPR compatible. Setting this parameter to `YES` will encrypt username in URL. The encryption data are cached to avoid high cpu usage. If the encryption is enabled, the DAV url will change. Default value is `NO`.
||||||| 65f833625
=======
|Enable URL encryption to make SOGo GDPR compatible. Setting this parameter to `YES` will encrypt username in URL. The encryption data are cached to avoid high cpu usage, ig the value of thie parameter is changed, memcached server needs to be restarted. If the encryption is enabled, the DAV url will change. Default value is `NO`.
|S |SOGoURLEncryptionPassphrase
|Passphrase for `SOGoURLEncryptionEnabled`. The string must be 128 bits (16 characters). If this settings change, the cache server must be restarted, and the DAV url will change. Default value is `SOGoSuperSecret0`.
|S |SOGoGlobalAddressBookFirstEntries
|Display first entries in Global Address Book. Default value is `NO`. If source is LDAP, the LDAP overlay `sssvlv` must be enabled on the system for server side sorting.
|S |SOGoGlobalAddressBookFirstEntriesCount
|Number of entries displayed when `SOGoGlobalAddressBookFirstEntries` is enabled. Default value is `100`.
>>>>>>> master
|S |SOGoURLEncryptionPassphrase
|Passphrase for `SOGoURLEncryptionEnabled`. The string must be 128 bits (16 characters). If this settings change, the cache server must be restarted, and the DAV url will change. Default value is `SOGoSuperSecret0`.
|=======================================================================
Expand Down
8 changes: 5 additions & 3 deletions SoObjects/SOGo/SOGoUser.m
Expand Up @@ -47,7 +47,7 @@

#import "SOGoUser.h"

static const NSString *kEncryptedUserNamePrefix = @"uenc-";
static const NSString *kEncryptedUserNamePrefix = @"uenc";

@implementation SoUser (SOGoExtension)

Expand Down Expand Up @@ -1213,11 +1213,13 @@ + (NSString *) getEncryptedUsernameIfNeeded:(NSString *)username withContext:(WO

request = [context request];
cache = [SOGoCache sharedCache];
cacheKey = [NSString stringWithFormat: @"%@%@%@", kEncryptedUserNamePrefix, username, [request requestHandlerKey]];
cacheKey = [NSString stringWithFormat: @"%@_%@_%@", kEncryptedUserNamePrefix, username, [request requestHandlerKey]];

exception = nil;
tmp = nil;

tmp = [cache valueForKey: cacheKey];
NSLog(@"DKEY %@ - %@", cacheKey, tmp);
if (tmp) {
return tmp;
} else {
Expand Down Expand Up @@ -1249,7 +1251,7 @@ + (NSString *) getDecryptedUsernameIfNeeded:(NSString *)username withContext:(WO

request = [context request];
cache = [SOGoCache sharedCache];
cacheKey = [NSString stringWithFormat: @"%@%@%@", kEncryptedUserNamePrefix, username, [request requestHandlerKey]];
cacheKey = [NSString stringWithFormat: @"%@_%@_%@", kEncryptedUserNamePrefix, username, [request requestHandlerKey]];
exception = nil;
tmp = nil;

Expand Down

0 comments on commit 10d789f

Please sign in to comment.