Remove fingerprint

This commit is contained in:
hlohaus
2025-08-09 10:20:56 +02:00
parent 17d36d5106
commit ddab0ffa07

View File

@@ -110,12 +110,12 @@ class Backend_Api(Api):
def get_public_key(): def get_public_key():
if not has_crypto: if not has_crypto:
return jsonify({"error": {"message": "Crypto support is not available"}}), 501 return jsonify({"error": {"message": "Crypto support is not available"}}), 501
try: # try:
diff = time.time() - int(base64.b64decode(request.cookies.get("fingerprint")).decode()) # diff = time.time() - int(base64.b64decode(request.cookies.get("fingerprint")).decode())
except Exception as e: # except Exception as e:
return jsonify({"error": {"message": "Invalid fingerprint"}}), 403 # return jsonify({"error": {"message": "Invalid fingerprint"}}), 403
if diff > 60 * 60 * 2: # if diff > 60 * 60 * 2:
return jsonify({"error": {"message": "Please refresh the page"}}), 403 # return jsonify({"error": {"message": "Please refresh the page"}}), 403
# Send the public key to the client for encryption # Send the public key to the client for encryption
return jsonify({ return jsonify({
"public_key": public_key_pem.decode(), "public_key": public_key_pem.decode(),