mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-04 21:08:51 +00:00
fix(sogo-tool): add protection to expire-sessions if the input is not an integer
This commit is contained in:
@@ -140,7 +140,12 @@
|
||||
|
||||
NSLog(@"Remove all sessions older than %d min", sessionExpireMinutes);
|
||||
|
||||
if (sessionExpireMinutes >= 0)
|
||||
if (sessionExpireMinutes == 0 && ![[arguments objectAtIndex: 0] isEqualToString:@"0"])
|
||||
{
|
||||
//If the input is not a number intValue return 0 so we check that's really the case
|
||||
[self usage];
|
||||
}
|
||||
else if (sessionExpireMinutes >= 0)
|
||||
{
|
||||
rc = [self expireUserSessionOlderThan: sessionExpireMinutes];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user