Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
748acc251c | ||
|
|
5e72e37c76 | ||
|
|
8e249d4abf |
No files matched your search
@@ -34,7 +34,7 @@ ActiveSync_RESOURCE_FILES += \
|
||||
ADDITIONAL_OBJCFLAGS += -Wno-deprecated-declarations
|
||||
ADDITIONAL_INCLUDE_DIRS += -I../SOPE/ -I../SoObjects/
|
||||
ADDITIONAL_LIB_DIRS += -L../SOPE/GDLContentStore/obj/ -L../SOPE/NGCards/obj/
|
||||
ADDITIONAL_INCLUDE_DIRS += $(shell pkg-config --cflags libwbxml2)
|
||||
ADDITIONAL_INCLUDE_DIRS += -I/usr/include/libwbxml-1.0/
|
||||
ADDITIONAL_LDFLAGS += -Wl,--no-as-needed -lwbxml2
|
||||
|
||||
-include GNUmakefile.preamble
|
||||
|
||||
@@ -806,16 +806,6 @@ Default value is `YES`, or enabled.
|
||||
authentication and global address books. Multiple sources can be
|
||||
specified as an array of dictionaries.
|
||||
|
||||
|S |SOGoForbidUnknownDomainsAuth
|
||||
|Boolean. If set to `YES`, prevent user that try to connect with an unknown domain.
|
||||
The known domains are set in parameter `SOGoDomainAllowed` and/or the domains listed in a <<multi-domains-configuration, Multi-domains Configuration>>. Default value is `NO`.
|
||||
|
||||
Obiously, if your users can connect without specifying a domain, let this parameter to `NO`.
|
||||
|
||||
|S |SOGoDomainAllowed
|
||||
|Parameter used to define which domains SOGo should allowed during a connection request. This parameter is an array of strings.
|
||||
|
||||
|
||||
|S |SOGoPasswordRecoveryEnabled
|
||||
|Boolean enable password recovery with secret question or secondary e-mail. Default value is `NO`.
|
||||
|
||||
@@ -2834,8 +2824,6 @@ like this:
|
||||
}
|
||||
----
|
||||
|
||||
[[multi-domains-configuration]]
|
||||
|
||||
Multi-domains Configuration
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@@ -36,8 +36,6 @@ static const NSString *kDisableSharingCalendar = @"Calendar";
|
||||
+ (SOGoSystemDefaults *) sharedSystemDefaults;
|
||||
|
||||
- (NSArray *) domainIds;
|
||||
- (BOOL) forbidUnknownDomainsAuth;
|
||||
- (NSArray *) domainsAllowed;
|
||||
- (BOOL) enableDomainBasedUID;
|
||||
- (NSArray *) loginDomains;
|
||||
- (NSArray *) visibleDomainsForDomain: (NSString *) domain;
|
||||
|
||||
@@ -258,8 +258,7 @@ _injectConfigurationFromFile (NSMutableDictionary *defaultsDict,
|
||||
|
||||
- (NSArray *) domainIds
|
||||
{
|
||||
NSDictionary *domains = [self dictionaryForKey: @"domains"];
|
||||
return [domains allKeys];
|
||||
return [[self dictionaryForKey: @"domains"] allKeys];
|
||||
}
|
||||
|
||||
- (BOOL) enableDomainBasedUID
|
||||
@@ -267,16 +266,6 @@ _injectConfigurationFromFile (NSMutableDictionary *defaultsDict,
|
||||
return [self boolForKey: @"SOGoEnableDomainBasedUID"];
|
||||
}
|
||||
|
||||
- (BOOL) forbidUnknownDomainsAuth
|
||||
{
|
||||
return [self boolForKey: @"SOGoForbidUnknownDomainsAuth"];
|
||||
}
|
||||
|
||||
- (NSArray *) domainsAllowed
|
||||
{
|
||||
return [NSMutableArray arrayWithArray: [self stringArrayForKey: @"SOGoDomainAllowed"]];
|
||||
}
|
||||
|
||||
- (NSArray *) loginDomains
|
||||
{
|
||||
NSMutableArray *filteredLoginDomains;
|
||||
|
||||
@@ -607,48 +607,10 @@ static const NSString *kObfuscatedSecondaryEmailKey = @"obfuscatedSecondaryEmail
|
||||
{
|
||||
*_domain = [username substringFromIndex: r.location+1];
|
||||
|
||||
if (![[sd domainIds] containsObject: *_domain])
|
||||
if (![[[SOGoSystemDefaults sharedSystemDefaults] domainIds] containsObject: *_domain])
|
||||
*_domain = nil;
|
||||
}
|
||||
}
|
||||
|
||||
// If the domains is unknwon we reject the auth
|
||||
if([sd forbidUnknownDomainsAuth])
|
||||
{
|
||||
NSArray *domainsAllowed, *domainsKnown;
|
||||
NSString *userDomain;
|
||||
NSRange r;
|
||||
BOOL allowed = NO;
|
||||
if(!*_domain)
|
||||
{
|
||||
r = [username rangeOfString: @"@"];
|
||||
if(r.location != NSNotFound)
|
||||
userDomain = [username substringFromIndex: r.location+1];
|
||||
else
|
||||
userDomain = nil;
|
||||
}
|
||||
else
|
||||
userDomain = *_domain;
|
||||
|
||||
if(!userDomain)
|
||||
{
|
||||
[self errorWithFormat: @"User attempt to login without domain"];
|
||||
return allowed;
|
||||
}
|
||||
|
||||
|
||||
if((domainsAllowed = [sd domainsAllowed]) && [domainsAllowed containsObject: userDomain])
|
||||
allowed = YES;
|
||||
if((domainsKnown = [sd domainIds]) && [domainsKnown containsObject: userDomain])
|
||||
allowed = YES;
|
||||
|
||||
if([domainsKnown length] == 0 && [domainsAllowed length] == 0)
|
||||
[self errorWithFormat: @"SOGoForbidUnknownDomainsAuth is set but sogo don't know any domains"];
|
||||
else if(!allowed)
|
||||
[self errorWithFormat: @"User domain is unknown or not allowed: %@", userDomain];
|
||||
|
||||
return allowed;
|
||||
}
|
||||
|
||||
// We check the fail count per user in memcache (per server). If the
|
||||
// fail count reaches X in Y minutes, we deny immediately the
|
||||
|
||||
@@ -73,11 +73,6 @@ ifeq ($(DIST_CODENAME), noble)
|
||||
MFA_CONFIG=--enable-mfa
|
||||
endif
|
||||
|
||||
# All other cases
|
||||
ifeq ($(MFA_CONFIG),)
|
||||
MFA_CONFIG=--enable-mfa
|
||||
endif
|
||||
|
||||
include /etc/GNUstep/GNUstep.conf
|
||||
include /usr/share/GNUstep/Makefiles/common.make
|
||||
|
||||
|
||||
Reference in new issue
Block a user