mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-26 06:46:13 +01:00
fix issue with uploading files -- in PUT requests, there was an additional newline inserted, which could lead to wrong interpretation of the payload if e.g. an intercepting web proxy was in between osc and the api server
This commit is contained in:
parent
c52baf09f7
commit
5be1e292fc
@ -21,7 +21,7 @@ BLOCKSIZE=1024
|
||||
|
||||
def delfile(url, file, username, password):
|
||||
|
||||
auth_string = base64.encodestring('%s:%s' % (username, password))
|
||||
auth_string = base64.encodestring('%s:%s' % (username, password)).strip()
|
||||
|
||||
u = urlparse.urlparse(url)
|
||||
host = u[1]
|
||||
@ -47,7 +47,7 @@ def putfile(url, file, username, password):
|
||||
|
||||
size = os.stat(file)[6]
|
||||
|
||||
auth_string = base64.encodestring('%s:%s' % (username, password))
|
||||
auth_string = base64.encodestring('%s:%s' % (username, password)).strip()
|
||||
|
||||
u = urlparse.urlparse(url)
|
||||
host = u[1]
|
||||
|
Loading…
Reference in New Issue
Block a user