summaryrefslogtreecommitdiffstats
path: root/store/api.py
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@pelagicore.com>2015-09-29 17:17:23 +0200
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-10-19 14:27:57 +0200
commitccc2be26cc311efabdf563a8e64cc5e352507d82 (patch)
treee8807491772a98d135f02d549b2d1630f3558767 /store/api.py
parentad41cea7d35abfac700180bdbc984590f1abc15d (diff)
Added APPSTORE_NO_SECURITY
Diffstat (limited to 'store/api.py')
-rw-r--r--store/api.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/store/api.py b/store/api.py
index 24ddf35..93faa9c 100644
--- a/store/api.py
+++ b/store/api.py
@@ -125,9 +125,12 @@ def appPurchase(request):
if not os.path.exists(toPath):
os.makedirs(toPath)
- with open(fromFilePath, 'rb') as package:
- pkgdata = parsePackageMetadata(package)
- addSignatureToPackage(fromFilePath, toPath + toFile, pkgdata['rawDigest'], deviceId)
+ if not settings.APPSTORE_NO_SECURITY:
+ with open(fromFilePath, 'rb') as package:
+ pkgdata = parsePackageMetadata(package)
+ addSignatureToPackage(fromFilePath, toPath + toFile, pkgdata['rawDigest'], deviceId)
+ else:
+ shutil.copyfile(fromFilePath, toPath + toFile)
return JsonResponse({'status': 'ok',
'url': request.build_absolute_uri('/app/download/' + toFile),