# lollms_core\\lollms\\server\\endpoints\\lollms_personalitie
s_infos.py
# ... more code
def sanitize_path(path:str, allow_absolute_path:bool=False, e
rror_text="Absolute database path detected", exception_text
="Detected an attempt of path traversal. Are you kidding m
e?"):
 # Prevent path traversal
 # ...
def sanitize_path_from_endpoint(path: str, error_text="A susp
ected LFI attack detected. The path sent to the server has su
spicious elements in it!", exception_text="Invalid path!"):
# Prevent path traversal too
 # ...
def check_access(lollmsElfServer, client_id):
 # check access
 # ...
def forbid_remote_access(lollmsElfServer, exception_text = "T
his functionality is forbidden if the server is exposed"):
 # ...