Skip to content

Commit ac08ac2

Browse files
committed
fix(ios): handle literal \n in public key (eg. from react-native-config)
1 parent c3f1db8 commit ac08ac2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ios/CodePush/CodePushUpdateUtils.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,9 @@ + (BOOL)verifyFolderHash:(NSString *)finalUpdateFolder
291291
// remove BEGIN / END tags and line breaks from public key string
292292
+ (NSString *)getKeyValueFromPublicKeyString:(NSString *)publicKeyString
293293
{
294+
publicKeyString = [publicKeyString stringByReplacingOccurrencesOfString:@"\\n"
295+
withString:@"\n"];
296+
294297
publicKeyString = [publicKeyString stringByReplacingOccurrencesOfString:@"-----BEGIN PUBLIC KEY-----\n"
295298
withString:@""];
296299
publicKeyString = [publicKeyString stringByReplacingOccurrencesOfString:@"-----END PUBLIC KEY-----"

0 commit comments

Comments
 (0)