We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fcdd5fd commit 71cb89cCopy full SHA for 71cb89c
modules/utils.py
@@ -482,6 +482,9 @@ def get_history_names(user_name=""):
482
if user_name == "" and hide_history_when_not_logged_in:
483
return []
484
else:
485
+ user_history_dir = os.path.join(HISTORY_DIR, user_name)
486
+ # ensure the user history directory is inside the HISTORY_DIR
487
+ assert os.path.realpath(user_history_dir).startswith(os.path.realpath(HISTORY_DIR))
488
history_files = get_file_names_by_last_modified_time(
489
os.path.join(HISTORY_DIR, user_name)
490
)
0 commit comments