summaryrefslogtreecommitdiff
path: root/bin/update
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-04-25 00:50:14 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-05-19 03:43:28 +0200
commitf8f7f70d33fe39ebc8534c825a9e58627a5b55ac (patch)
treefd3b9d846327860cbaf4d6abc9ded1bc9ed53a94 /bin/update
parent9bab1f894fa4b76f96bb43e674f164574a8e3ed4 (diff)
send the csrf token with the updater scripts
Change-Id: Iad6953b8206ba02ca09069115e168230b27f72fe
Diffstat (limited to 'bin/update')
-rwxr-xr-xbin/update/upload_build_config.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/update/upload_build_config.py b/bin/update/upload_build_config.py
index 0380cc1c323b..3267f021b8e3 100755
--- a/bin/update/upload_build_config.py
+++ b/bin/update/upload_build_config.py
@@ -29,9 +29,11 @@ def main(argv):
r1 = session.post(login_url, data=login_data, headers={"Referer": login_url})
url = base_address + "update/upload/release"
+ data = {}
+ data['csrfmiddlewaretoken'] = csrftoken
build_config = os.path.join(sys.argv[1], "build_config.json")
- r = session.post(url, files={'release_config': open(build_config, "r")})
+ r = session.post(url, files={'release_config': open(build_config, "r")}, data=data)
print(r.content)
if r.status_code != 200:
sys.exit(1)