mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-06-17 06:48:10 +00:00
upgraded ui
This commit is contained in:
@ -14,7 +14,7 @@ from starlette.responses import StreamingResponse
|
||||
from lollms.types import MSG_TYPE
|
||||
from lollms.main_config import BaseConfig
|
||||
from lollms.utilities import detect_antiprompt, remove_text_from_string, trace_exception, show_yes_no_dialog
|
||||
from lollms.security import sanitize_path
|
||||
from lollms.security import sanitize_path, forbid_remote_access
|
||||
from ascii_colors import ASCIIColors
|
||||
from lollms.databases.discussions_database import DiscussionsDB
|
||||
from pathlib import Path
|
||||
@ -146,6 +146,7 @@ async def open_file(file_path: FilePath):
|
||||
if not show_yes_no_dialog("Validation","Do you validate the opening of a file?"):
|
||||
return {"status":False,"error":"User refused the opeining file!"}
|
||||
|
||||
forbid_remote_access(lollmsElfServer)
|
||||
try:
|
||||
# Validate the 'path' parameter
|
||||
path = sanitize_path(file_path.path)
|
||||
|
Reference in New Issue
Block a user