Added new failed login rate-limiting options

This commit is contained in:
Ludovic Marcotte
2013-06-11 09:41:17 -04:00
parent 2a51f6f385
commit cfee5aa3f4
9 changed files with 176 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
/* SOGoSystemDefaults.m - this file is part of SOGo
*
* Copyright (C) 2009-2012 Inverse inc.
* Copyright (C) 2009-2013 Inverse inc.
* Copyright (C) 2012 Jeroen Dekkers <jeroen@dekkers.ch>
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
@@ -513,4 +513,33 @@ _injectConfigurationFromFile (NSMutableDictionary *defaultsDict,
return [self boolForKey: @"SOGoEnablePublicAccess"];
}
- (int) maximumFailedLoginCount
{
return [self integerForKey: @"SOGoMaximumFailedLoginCount"];
}
- (int) maximumFailedLoginInterval
{
int v;
v = [self integerForKey: @"SOGoMaximumFailedLoginInterval"];
if (!v)
v = 10;
return v;
}
- (int) failedLoginBlockInterval
{
int v;
v = [self integerForKey: @"SOGoFailedLoginBlockInterval"];
if (!v)
v = 300;
return v;
}
@end