diff --git a/ldm/dream/server.py b/ldm/dream/server.py index efe3139f74..db33f6d6a0 100644 --- a/ldm/dream/server.py +++ b/ldm/dream/server.py @@ -17,7 +17,7 @@ class DreamServer(BaseHTTPRequestHandler): self.wfile.write(content.read()) else: path = "." + self.path - cwd = os.getcwd() + cwd = os.path.realpath(os.getcwd()) is_in_cwd = os.path.commonprefix((os.path.realpath(path), cwd)) == cwd if not (is_in_cwd and os.path.exists(path)): self.send_response(404)