From 6e34c499ed186e51b940e8ef6719a74dc26562bd Mon Sep 17 00:00:00 2001 From: swee Date: Tue, 14 Jan 2025 20:40:07 -0800 Subject: [PATCH] Update server.py --- server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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