feat(core): Add URL encryption for GDPR compliancy (fix some dav issues)

This commit is contained in:
smizrahi
2023-10-18 16:37:08 +02:00
parent 54a1f922f9
commit 9ef49bb56f
2 changed files with 5 additions and 3 deletions

View File

@@ -533,7 +533,7 @@ static NSArray *childRecordFields = nil;
publicParticle = @"";
path = [NSString stringWithFormat: @"/%@/dav%@/%@/%@/%@/",
appName, publicParticle,
[[self ownerInContext: nil] stringByEscapingURL],
[[SOGoUser getEncryptedUsernameIfNeeded:[self ownerInContext: nil] withContext: context] stringByEscapingURL],
[[container nameInContainer] stringByEscapingURL],
[[self realNameInContainer] stringByEscapingURL]];
currentDavURL = [self davURL];

View File

@@ -32,9 +32,11 @@
acquire: (BOOL) acquire
{
id userFolder;
NSString *login;
if ([key length] > 0 && [SOGoUser userWithLogin: key roles: nil])
userFolder = [SOGoUserFolder objectWithName: key inContainer: self];
login = [SOGoUser getDecryptedUsernameIfNeeded: key withContext: localContext];
if ([key length] > 0 && [SOGoUser userWithLogin: login roles: nil])
userFolder = [SOGoUserFolder objectWithName: login inContainer: self];
else
userFolder = nil;