nowsecure / node-applesign

NodeJS module and commandline utility for re-signing iOS applications (IPA files).
https://www.nowsecure.com
MIT License
420 stars 77 forks source link

Handle null entitlements when using -c #111

Closed dki closed 3 years ago

dki commented 3 years ago

When an app has null entitlements and also uses -c to clone entitlements, an error occurs when adjusting entitlements:

TypeError: Cannot read property 'toString' of null
    at Applesign.adjustEntitlementsSync (/Users/blah/node-applesign/index.js:305:36)
    at Applesign.adjustEntitlements (/Users/blah/node-applesign/index.js:465:10)
    at process._tickCallback (internal/process/next_tick.js:68:7)

This changes ensures that entitlements are not null prior to parsing them.