From: Benjamin Braatz Date: Wed, 13 Jan 2021 02:20:04 +0000 (+0100) Subject: Serving bug fixes X-Git-Url: http://git.graph-it.com/?a=commitdiff_plain;h=bd3c65a4a1d9fb0f2d2867c22ee55b3488a05c4b;p=graphit%2Fschaltschrank.git Serving bug fixes --- diff --git a/graphit_controlpi/websocket.py b/graphit_controlpi/websocket.py index 9d0ee8e..a23ac1e 100644 --- a/graphit_controlpi/websocket.py +++ b/graphit_controlpi/websocket.py @@ -1,3 +1,4 @@ +import os import functools import socket import json @@ -60,6 +61,7 @@ async def process_request(sever_root, path, request_headers): ('Server', 'graphit_controlpi websocket server'), ('Connection', 'close'), ] + server_root = os.path.realpath(os.path.join(os.getcwd(), server_root)) full_path = os.path.realpath(os.path.join(sever_root, path[1:])) if os.path.commonpath((sever_root, full_path)) != sever_root or \ not os.path.exists(full_path) or not os.path.isfile(full_path): diff --git a/setup.py b/setup.py index 6f4a328..b848e3a 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with open("README.md", "r") as readme_file: setuptools.setup( name="graphit-controlpi", - version="0.2.1", + version="0.2.2", author="Graph-IT GmbH", author_email="info@graph-it.com", description="Main Module for Machine Control Pi",