mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-18 20:17:50 +00:00
Added sanitize_svg function and forbid_remote_access is used for setting personality settings
This commit is contained in:
parent
4e85868276
commit
6508946102
@ -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, add_period
|
||||
from lollms.security import sanitize_path, forbid_remote_access, check_access
|
||||
from lollms.security import sanitize_path, forbid_remote_access, check_access, sanitize_svg
|
||||
from ascii_colors import ASCIIColors
|
||||
from lollms.databases.discussions_database import DiscussionsDB
|
||||
from lollms.client_session import Client
|
||||
@ -104,7 +104,7 @@ async def execute_code(request: CodeRequest):
|
||||
if language=="svg":
|
||||
ASCIIColors.info("Executing svg code:")
|
||||
ASCIIColors.yellow(code)
|
||||
return execute_svg(code, client, message_id)
|
||||
return execute_svg(sanitize_svg(code), client, message_id)
|
||||
if language=="javascript":
|
||||
ASCIIColors.info("Executing javascript code:")
|
||||
ASCIIColors.yellow(code)
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 104293d5e922d0631f307e23da30069efcc8e2de
|
||||
Subproject commit eda3af5f5c4ea9b2f3569f72f8d05989e29367fc
|
Loading…
Reference in New Issue
Block a user