Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
stable-diffusion-webui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
stable-diffusion-webui
Commits
b46b97fa
Commit
b46b97fa
authored
Jan 01, 2023
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more fixes for gradio update
parent
76f256fe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
generation_parameters_copypaste.py
modules/generation_parameters_copypaste.py
+1
-1
ui_tempdir.py
modules/ui_tempdir.py
+1
-1
No files found.
modules/generation_parameters_copypaste.py
View file @
b46b97fa
...
@@ -38,7 +38,7 @@ def quote(text):
...
@@ -38,7 +38,7 @@ def quote(text):
def
image_from_url_text
(
filedata
):
def
image_from_url_text
(
filedata
):
if
type
(
filedata
)
==
dict
and
filedata
[
"is_file"
]:
if
type
(
filedata
)
==
dict
and
filedata
[
"is_file"
]:
filename
=
filedata
[
"name"
]
filename
=
filedata
[
"name"
]
is_in_right_dir
=
any
(
Path
(
temp_dir
)
.
resolve
()
in
Path
(
filename
)
.
resolve
()
.
parents
for
temp_dir
in
shared
.
demo
.
temp_dirs
)
is_in_right_dir
=
any
(
[
filename
in
fileset
for
fileset
in
shared
.
demo
.
temp_file_sets
]
)
assert
is_in_right_dir
,
'trying to open image file outside of allowed directories'
assert
is_in_right_dir
,
'trying to open image file outside of allowed directories'
return
Image
.
open
(
filename
)
return
Image
.
open
(
filename
)
...
...
modules/ui_tempdir.py
View file @
b46b97fa
...
@@ -45,7 +45,7 @@ def on_tmpdir_changed():
...
@@ -45,7 +45,7 @@ def on_tmpdir_changed():
os
.
makedirs
(
shared
.
opts
.
temp_dir
,
exist_ok
=
True
)
os
.
makedirs
(
shared
.
opts
.
temp_dir
,
exist_ok
=
True
)
shared
.
demo
.
temp_
dirs
=
shared
.
demo
.
temp_dirs
|
{
os
.
path
.
abspath
(
shared
.
opts
.
temp_dir
)}
shared
.
demo
.
temp_
file_sets
[
0
]
=
shared
.
demo
.
temp_file_sets
[
0
]
|
{
os
.
path
.
abspath
(
shared
.
opts
.
temp_dir
)}
def
cleanup_tmpdr
():
def
cleanup_tmpdr
():
...
...
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