Skip to content

Commit

Permalink
Enforece SOGoSearchMinimumWordLength server-side
Browse files Browse the repository at this point in the history
Fixes #4525
  • Loading branch information
cgx committed Aug 21, 2018
1 parent 828d773 commit 71fa451
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions UI/Contacts/UIxContactFoldersView.m
Expand Up @@ -164,7 +164,7 @@ - (BOOL) hasContactSelectionButtons
BOOL excludeGroups, excludeLists;

searchText = [self queryParameterForKey: @"search"];
if ([searchText length] > 0)
if ([searchText length] >= [self minimumSearchLength])
{
// NSLog(@"Search all contacts: %@", searchText);
excludeGroups = [[self queryParameterForKey: @"excludeGroups"] boolValue];
Expand Down Expand Up @@ -251,7 +251,7 @@ - (BOOL) hasContactSelectionButtons
}
else
result = [NSException exceptionWithHTTPStatus: 400
reason: @"missing 'search' parameter"];
reason: [NSString stringWithFormat: @"'search' parameter must be at least %i characters", [self minimumSearchLength]]];

return result;
}
Expand Down

0 comments on commit 71fa451

Please sign in to comment.