(fix) safe-guarding against bogus value coming from the quick tables
parent
d63e277fc6
commit
1d2763af3c
1
NEWS
1
NEWS
|
@ -6,6 +6,7 @@ Enhancements
|
|||
|
||||
Bug fixes
|
||||
- [web] handle birthday dates before 1970
|
||||
- [web] safe-guarding against bogus value coming from the quick tables
|
||||
|
||||
3.0.1 (2016-02-05)
|
||||
------------------
|
||||
|
|
|
@ -902,17 +902,22 @@ static inline iCalPersonPartStat _userStateInEvent (NSArray *event)
|
|||
state = iCalPersonPartStatOther;
|
||||
|
||||
participants = [event objectAtIndex: eventPartMailsIndex];
|
||||
states = [event objectAtIndex: eventPartStatesIndex];
|
||||
count = 0;
|
||||
max = [participants count];
|
||||
user = [SOGoUser userWithLogin: [event objectAtIndex: eventOwnerIndex]
|
||||
roles: nil];
|
||||
while (state == iCalPersonPartStatOther && count < max)
|
||||
|
||||
// We guard ourself against bogus value coming from the quick tables
|
||||
if ([participants isKindOfClass: [NSArray class]])
|
||||
{
|
||||
if ([user hasEmail: [participants objectAtIndex: count]])
|
||||
state = [[states objectAtIndex: count] intValue];
|
||||
else
|
||||
count++;
|
||||
states = [event objectAtIndex: eventPartStatesIndex];
|
||||
count = 0;
|
||||
max = [participants count];
|
||||
user = [SOGoUser userWithLogin: [event objectAtIndex: eventOwnerIndex]
|
||||
roles: nil];
|
||||
while (state == iCalPersonPartStatOther && count < max)
|
||||
{
|
||||
if ([user hasEmail: [participants objectAtIndex: count]])
|
||||
state = [[states objectAtIndex: count] intValue];
|
||||
else
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
return state;
|
||||
|
|
Loading…
Reference in New Issue