Skip to content

Commit 0163aca

Browse files
raen79Sourabh Debnath
authored andcommitted
fixed issue where foreign characters break data integrity check (microsoft#2078)
1 parent b29e31a commit 0163aca

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)