Skip to content

Commit

Permalink
Prevent inclusion of local files via file:// XML entities
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski committed Jan 29, 2016
1 parent 70f6929 commit a6e9c8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sparkle/SUAppcast.m
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ - (void)downloadDidFinish:(NSURLDownload *)__unused aDownload
if (self.downloadFilename)
{
NSUInteger options = 0;
options = NSXMLNodeLoadExternalEntitiesSameOriginOnly;
options = NSXMLNodeLoadExternalEntitiesNever; // Prevent inclusion from file://
document = [[NSXMLDocument alloc] initWithContentsOfURL:[NSURL fileURLWithPath:self.downloadFilename] options:options error:&error];

[[NSFileManager defaultManager] removeItemAtPath:self.downloadFilename error:nil];
Expand Down

0 comments on commit a6e9c8a

Please sign in to comment.