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