diff --git a/server.py b/server.py index 9fa1aa8..95c4743 100644 --- a/server.py +++ b/server.py @@ -38,8 +38,8 @@ def loadcert_backend(): return "Please upload a certificate and private key." if allowed_file(cert.filename) and allowed_file(privkey.filename): random_name = ''.join(random.choice(string.ascii_lowercase+string.digits+string.ascii_uppercase) for i in range(8)) - cert.save(homefolder + "/certs/" + randomname + "-chain.pem") - privkey.save(homefolder + "/certs/" + randomname + "-privkey.pem") + cert.save(homefolder + "/certs/" + random_name + "-chain.pem") + privkey.save(homefolder + "/certs/" + random_name + "-privkey.pem") resp = make_response("Success!") resp.set_cookie('certname',random_name) return resp