New system default SOGoEncryptionKey
To be used to encrypt the passwords of remote Web calendars when SOGoTrustProxyAuthentication is enabled.pull/10/head
parent
41a6c02aa3
commit
d12c651d59
5
NEWS
5
NEWS
|
@ -1,8 +1,9 @@
|
|||
2.0.5 (2013-02-dd)
|
||||
2.0.5 (2013-03-dd)
|
||||
------------------
|
||||
|
||||
New features
|
||||
-
|
||||
- new system default SOGoEncryptionKey to be used to encrypt the passwords of
|
||||
remote Web calendars when SOGoTrustProxyAuthentication is enabled
|
||||
|
||||
Enhancements
|
||||
- Added logging of the X-Forwarded-For HTTP header (#2229)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* SOGoWebAppointmentFolder.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2009-2010 Inverse inc.
|
||||
* Copyright (C) 2009-2013 Inverse inc.
|
||||
*
|
||||
* Author: Cyril Robert <crobert@inverse.ca>
|
||||
* Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
@ -37,6 +37,7 @@
|
|||
#import <NGCards/iCalCalendar.h>
|
||||
#import <GDLContentStore/GCSFolder.h>
|
||||
#import <SOGo/SOGoAuthenticator.h>
|
||||
#import <SOGo/SOGoSystemDefaults.h>
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGo/SOGoUserSettings.h>
|
||||
#import <SOGo/NSDictionary+Utilities.h>
|
||||
|
@ -69,14 +70,11 @@ size_t curl_body_function(void *ptr, size_t size, size_t nmemb, void *buffer)
|
|||
NSString *authValue, *userPassword;
|
||||
NSArray *parts, *keys;
|
||||
|
||||
userPassword = [[self authenticatorInContext: context]
|
||||
passwordInContext: context];
|
||||
userPassword = [[self authenticatorInContext: context] passwordInContext: context];
|
||||
if ([userPassword length] == 0)
|
||||
{
|
||||
authData = nil;
|
||||
userPassword = [[SOGoSystemDefaults sharedSystemDefaults] encryptionKey];
|
||||
}
|
||||
else
|
||||
{
|
||||
authValue
|
||||
= [[self folderPropertyValueInCategory: @"WebCalendarsAuthentication"]
|
||||
decryptWithKey: userPassword];
|
||||
|
@ -89,7 +87,6 @@ size_t curl_body_function(void *ptr, size_t size, size_t nmemb, void *buffer)
|
|||
}
|
||||
else
|
||||
authData = nil;
|
||||
}
|
||||
|
||||
return authData;
|
||||
}
|
||||
|
@ -99,10 +96,11 @@ size_t curl_body_function(void *ptr, size_t size, size_t nmemb, void *buffer)
|
|||
{
|
||||
NSString *authValue, *userPassword;
|
||||
|
||||
userPassword = [[self authenticatorInContext: context]
|
||||
passwordInContext: context];
|
||||
if ([userPassword length] > 0)
|
||||
{
|
||||
userPassword = [[self authenticatorInContext: context] passwordInContext: context];
|
||||
if ([userPassword length] == 0) {
|
||||
userPassword = [[SOGoSystemDefaults sharedSystemDefaults] encryptionKey];
|
||||
}
|
||||
|
||||
if (!username)
|
||||
username = @"";
|
||||
if (!password)
|
||||
|
@ -110,7 +108,6 @@ size_t curl_body_function(void *ptr, size_t size, size_t nmemb, void *buffer)
|
|||
authValue = [NSString stringWithFormat: @"%@:%@", username, password];
|
||||
[self setFolderPropertyValue: [authValue encryptWithKey: userPassword]
|
||||
inCategory: @"WebCalendarsAuthentication"];
|
||||
}
|
||||
}
|
||||
|
||||
- (NSDictionary *) loadWebCalendar
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
SOGoZipPath = "/usr/bin/zip";
|
||||
|
||||
SOGoEncryptionKey = "MySOGoEncryptionKey";
|
||||
|
||||
WOUseRelativeURLs = YES;
|
||||
WOMessageUseUTF8 = YES;
|
||||
WOParsersUseUTF8 = YES;
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
- (BOOL) debugLeaks;
|
||||
- (int) vmemLimit;
|
||||
- (BOOL) trustProxyAuthentication;
|
||||
- (NSString *) encryptionKey;
|
||||
- (BOOL) useRelativeURLs;
|
||||
|
||||
- (BOOL) isWebAccessEnabled;
|
||||
|
|
|
@ -349,6 +349,11 @@ _injectConfigurationFromFile (NSMutableDictionary *defaultsDict,
|
|||
return [self boolForKey: @"SOGoTrustProxyAuthentication"];
|
||||
}
|
||||
|
||||
- (NSString *) encryptionKey;
|
||||
{
|
||||
return [self stringForKey: @"SOGoEncryptionKey"];
|
||||
}
|
||||
|
||||
- (BOOL) useRelativeURLs
|
||||
{
|
||||
return [self boolForKey: @"WOUseRelativeURLs"];
|
||||
|
|
Loading…
Reference in New Issue