Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 54dad33

Browse files
authored
fixed issue where foreign characters break data integrity check (#2078)
1 parent c5b7bed commit 54dad33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ios/CodePush/CodePushUpdateUtils.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ + (NSString *)computeFinalHashFromManifest:(NSMutableArray *)manifest
9393
// The JSON serialization turns path separators into "\/", e.g. "CodePush\/assets\/image.png"
9494
manifestString = [manifestString stringByReplacingOccurrencesOfString:@"\\/"
9595
withString:@"/"];
96-
return [self computeHashForData:[NSData dataWithBytes:manifestString.UTF8String length:manifestString.length]];
96+
return [self computeHashForData:[NSData dataWithBytes:manifestString.UTF8String length:[manifestString lengthOfBytesUsingEncoding:NSUTF8StringEncoding]]];
9797
}
9898

9999
+ (NSString *)computeHashForData:(NSData *)inputData

0 commit comments

Comments
 (0)