Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
1f8d08ea
Commit
1f8d08ea
authored
Aug 07, 2024
by
root
Browse files
SSRF Fix
parent
d3146d20
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
backend/apps/images/main.py
backend/apps/images/main.py
+2
-1
No files found.
backend/apps/images/main.py
View file @
1f8d08ea
...
@@ -151,9 +151,10 @@ async def update_engine_url(
...
@@ -151,9 +151,10 @@ async def update_engine_url(
url
=
form_data
.
AUTOMATIC1111_BASE_URL
.
strip
(
"/"
)
url
=
form_data
.
AUTOMATIC1111_BASE_URL
.
strip
(
"/"
)
try
:
try
:
r
=
requests
.
head
(
url
)
r
=
requests
.
head
(
url
)
r
.
raise_for_status
()
app
.
state
.
config
.
AUTOMATIC1111_BASE_URL
=
url
app
.
state
.
config
.
AUTOMATIC1111_BASE_URL
=
url
except
Exception
as
e
:
except
Exception
as
e
:
raise
HTTPException
(
status_code
=
400
,
detail
=
ERROR_MESSAGES
.
DEFAULT
(
e
)
)
raise
HTTPException
(
status_code
=
400
,
detail
=
"Invalid URL provided."
)
if
form_data
.
COMFYUI_BASE_URL
==
None
:
if
form_data
.
COMFYUI_BASE_URL
==
None
:
app
.
state
.
config
.
COMFYUI_BASE_URL
=
COMFYUI_BASE_URL
app
.
state
.
config
.
COMFYUI_BASE_URL
=
COMFYUI_BASE_URL
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment