mirror of
https://github.com/openSUSE/osc.git
synced 2025-09-06 05:08:42 +02: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:
@@ -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]
|
||||
|
Reference in New Issue
Block a user