mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 05:39:20 +08:00
_get_notebook_file() previously joined the request-controlled notebook_id onto the notebook base directory without validating the resolved path, and _save_notebook() wrote using the file-content id field instead of the caller's validated id. Together these allowed an arbitrary .json overwrite (e.g. data/system/auth/users.json) leading to privilege escalation. - _get_notebook_file(): resolve the target and reject any path that escapes base_dir (Path.is_relative_to), raising ValueError. - _save_notebook(): accept the validated notebook_id explicitly instead of trusting notebook['id']; all call sites updated to pass it.