Skip to content

Commit

Permalink
santactl/sync: Catch rare crash in FCM parsing (#609)
Browse files Browse the repository at this point in the history
  • Loading branch information
russellhancox committed Sep 23, 2021
1 parent e68fb72 commit 4bb5804
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/santactl/Commands/sync/SNTCommandSyncManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ - (NSData *)messageDataFromFCMmessage:(NSDictionary *)FCMmessage {
}

- (NSDictionary *)messageFromMessageData:(NSData *)messageData {
if (!messageData) {
LOGD(@"Unable to parse push notification message data");
return nil;
}
NSError *error;
NSDictionary *rawMessage = [NSJSONSerialization JSONObjectWithData:messageData
options:0
Expand Down

0 comments on commit 4bb5804

Please sign in to comment.