From 3d584d9e68fa9f72d3486fc5fe4eff76042e520a Mon Sep 17 00:00:00 2001 From: tzwm Date: Fri, 22 Mar 2024 14:11:08 +0800 Subject: [PATCH] fix the path parse in the xyz_plot#api_get_score_statistic --- routes/xyz_plot.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/routes/xyz_plot.py b/routes/xyz_plot.py index 78c2dcf..ee8d45f 100644 --- a/routes/xyz_plot.py +++ b/routes/xyz_plot.py @@ -48,6 +48,11 @@ async def api_get_score_statistic(request): if not target_path: return web.Response(status=404) + #/browser/s/outputs/xyz_plot_4/result.json + if len(target_path.split('/')) < 5: + return web.Response(status=400) + + target_path = target_path.split('/')[4] log_path = os.path.join( folder_paths.get_output_directory(), target_path,