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
5558514f
Commit
5558514f
authored
Apr 01, 2024
by
Timothy J. Baek
Browse files
fix
parent
83c7633a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
backend/apps/rag/main.py
backend/apps/rag/main.py
+1
-1
No files found.
backend/apps/rag/main.py
View file @
5558514f
...
@@ -453,7 +453,7 @@ def store_doc(
...
@@ -453,7 +453,7 @@ def store_doc(
if
not
unsanitized_filename
.
isascii
():
if
not
unsanitized_filename
.
isascii
():
is_valid_filename
=
False
is_valid_filename
=
False
unvalidated_file_path
=
f
"
{
UPLOAD_DIR
}
/
{
unsanitized_filename
}
"
unvalidated_file_path
=
f
"
{
UPLOAD_DIR
}
/
{
unsanitized_filename
}
"
dereferenced_file_path
=
str
(
Path
(
unvalidated_file_path
).
resolve
(
strict
=
False
))
dereferenced_file_path
=
str
(
Path
(
unvalidated_file_path
).
resolve
(
strict
=
False
))
if
not
dereferenced_file_path
.
startswith
(
UPLOAD_DIR
):
if
not
dereferenced_file_path
.
startswith
(
UPLOAD_DIR
):
is_valid_filename
=
False
is_valid_filename
=
False
...
...
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