Commit 12e0939
authored
Fix Invalid JSON Crash (#323)
* Fix Invalid JSON Crash
• Fixes a rare crash during registration, suspected to be caused by invalid JSON in tags (first issue #322 )
• Adds JSON validation to all requests
• Fixes unit tests, which were failing around 30% of the time due to concurrency issues
• Fixes nil device_model crash (second issue in #322 )
• Adds a test to ensure invalid JSON won't cause a crash1 parent 47851fa commit 12e0939
File tree
3 files changed
+491
-398
lines changed- iOS_SDK/OneSignalSDK
- Source
- UnitTests
3 files changed
+491
-398
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
627 | | - | |
| 627 | + | |
628 | 628 | | |
629 | | - | |
| 629 | + | |
630 | 630 | | |
631 | 631 | | |
632 | 632 | | |
| |||
638 | 638 | | |
639 | 639 | | |
640 | 640 | | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
641 | 653 | | |
642 | 654 | | |
643 | 655 | | |
| |||
983 | 995 | | |
984 | 996 | | |
985 | 997 | | |
986 | | - | |
987 | 998 | | |
988 | 999 | | |
989 | 1000 | | |
| |||
992 | 1003 | | |
993 | 1004 | | |
994 | 1005 | | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
995 | 1009 | | |
996 | 1010 | | |
997 | 1011 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
76 | 83 | | |
77 | 84 | | |
78 | 85 | | |
| |||
0 commit comments