we first need to read all the input to be able to send an error

* this is done by creating the cgi.FieldStorage
This commit is contained in:
clime 2019-06-11 17:50:40 +02:00
parent 3111958b1e
commit 6ff6fb94bd

View file

@ -123,9 +123,10 @@ def ensure_namespaced(name, namespace):
def main():
form = cgi.FieldStorage()
config = ConfigParser()
config.read('/etc/dist-git/dist-git.conf')
os.umask(0o002)
username = os.environ.get('SSL_CLIENT_S_DN_CN', None)
@ -141,7 +142,6 @@ def main():
assert os.environ['REQUEST_URI'].split('/')[1] == 'repo'
form = cgi.FieldStorage()
name = check_form(form, 'name').strip('/')
# Search for the file hash, start with stronger hash functions