summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Oster <tkfu@users.noreply.github.com>2018-06-07 11:16:24 +0200
committerGitHub <noreply@github.com>2018-06-07 11:16:24 +0200
commiteece3ab3b0deb2cfd8406da7843828473e7d1c35 (patch)
treeae9c290e8e1f04a9060790081eeb4b540e510025
parent8267c352804d82280c37ff3ebb23efd9aaf01dea (diff)
parent6e9c2bd97656d8bc46fce894fcb9a1c8cf3751ca (diff)
downloadmeta-updater-eece3ab3b0deb2cfd8406da7843828473e7d1c35.tar.gz
Merge pull request #332 from advancedtelematic/bugfix/strip-whitespace-from-tuf-url
Bugfix: strip whitespace and newlines from tuf URL in credentials.zip
-rw-r--r--recipes-sota/aktualizr/garage-sign-version.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/recipes-sota/aktualizr/garage-sign-version.inc b/recipes-sota/aktualizr/garage-sign-version.inc
index 66e3ffd..fac15a0 100644
--- a/recipes-sota/aktualizr/garage-sign-version.inc
+++ b/recipes-sota/aktualizr/garage-sign-version.inc
@@ -8,7 +8,7 @@ python () {
8 with zipfile.ZipFile(d.getVar("SOTA_PACKED_CREDENTIALS", True), 'r') as zip_ref: 8 with zipfile.ZipFile(d.getVar("SOTA_PACKED_CREDENTIALS", True), 'r') as zip_ref:
9 try: 9 try:
10 with zip_ref.open('tufrepo.url', mode='r') as url_file: 10 with zip_ref.open('tufrepo.url', mode='r') as url_file:
11 url = url_file.read().decode() + '/health/version' 11 url = url_file.read().decode().strip(' \n\t') + '/health/version'
12 except (KeyError, ValueError, RuntimeError): 12 except (KeyError, ValueError, RuntimeError):
13 return 13 return
14 r = urllib.request.urlopen(url) 14 r = urllib.request.urlopen(url)