mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
Applied patch @ a6e9c8aff6 from the main Sparkle tree, to prevent inclusion from a file in the appcast.
(this is still not foolproof - a man in the middle attack could do plenty of mischief with the wrong http/https url)
This commit is contained in:
1 parent
934398c35a
commit
ec146a9828
1 file changed
+1
-2
+1
-2
@@ -99,8 +99,7 @@
|
||||
// In order to avoid including external entities when parsing the appcast (a potential security vulnerability; see https://github.com/andymatuschak/Sparkle/issues/169), we ask NSXMLDocument to "tidy" the XML first. This happens to remove these external entities; it wouldn't be a future-proof approach, but it worked in these historical versions of OS X, and we have a more rigorous approach for 10.7+.
|
||||
options = NSXMLDocumentTidyXML;
|
||||
} else {
|
||||
// In 10.7 and later, there's a real option for the behavior we desire.
|
||||
options = NSXMLNodeLoadExternalEntitiesSameOriginOnly;
|
||||
options = NSXMLNodeLoadExternalEntitiesNever; // Prevent inclusion from file://
|
||||
}
|
||||
document = [[[NSXMLDocument alloc] initWithContentsOfURL:[NSURL fileURLWithPath:downloadFilename] options:options error:&error] autorelease];
|
||||
|
||||
|
||||
Reference in new issue
Block a user