fix(user): check session key value before using it

This commit is contained in:
Hivert Quentin committed 2026-10-14 10:46:50 +02:00
1 parent 4dcda8f72d
commit 868ecbea55
2 files changed
+7 -1

No files matched your search

+2 -1
View File
@@ -204,7 +204,7 @@ static NSString *sessionsFolderURLString = nil;
NSArray *attrs;
NSDictionary *record;
EOEntity *entity;
EOSQLQualifier *qualifier;
EOQualifier *qualifier;
record = nil;
@@ -217,6 +217,7 @@ static NSString *sessionsFolderURLString = nil;
qualifierFormat:
@"c_id='%@'",
theID];
[qualifier autorelease];
[context beginTransaction];
+5
View File
@@ -45,6 +45,11 @@
cache = [SOGoCache sharedCache];
//We check that the session is base64
NSData *decodedData = [[NSData alloc] initWithBase64EncodedString:theSessionKey options:0];
if(!decodedData)
return value;
key = [NSString stringWithFormat: @"session:%@", theSessionKey];
value = [cache valueForKey: key];