Skip to content

Commit

Permalink
Fixing security error on MacOS for AddonManager, see https://forum.fr…
Browse files Browse the repository at this point in the history
  • Loading branch information
PLChris authored and yorikvanhavre committed Oct 30, 2017
1 parent 178e5dd commit 2bc75bd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Mod/AddonManager/AddonManager.py
Expand Up @@ -766,7 +766,10 @@ def checkDependencies(self,baseurl):
depsurl += "/"
depsurl += "master/metadata.txt"
try:
mu = urllib2.urlopen(depsurl)
if ctx:
mu = urllib2.urlopen(depsurl,context=ctx)
else:
mu = urllib2.urlopen(depsurl)
except urllib2.HTTPError:
# no metadata.txt, we just continue without deps checking
pass
Expand Down Expand Up @@ -823,7 +826,10 @@ def download(self,giturl,clonedir):
zipurl = giturl+"/archive/master.zip"
try:
print("Downloading "+zipurl)
u = urllib2.urlopen(zipurl)
if ctx:
u = urllib2.urlopen(zipurl,context=ctx)
else:
u = urllib2.urlopen(zipurl)
except:
return translate("AddonsInstaller", "Error: Unable to download") + " " + zipurl
zfile = io.StringIO()
Expand Down

0 comments on commit 2bc75bd

Please sign in to comment.