fix code break in tables, remove folder restriction in image_get

frdel committed Jan 22, 2026 at 10:02 UTC fa12cd50e2928fd677dec517026c91cffcacdf7a
2 files changed +10 -9
python/api/image_get.py
+8 -7
@@ -23,20 +23,21 @@ class ImageGet(ApiHandler):
23 if not path:
24 raise ValueError("No path provided")
25
26 + # no real need to check, we have the extension filter in place
27 # check if path is within base directory
27 - if runtime.is_development():
28 - in_base = files.is_in_base_dir(files.fix_dev_path(path))
29 - else:
30 - in_base = files.is_in_base_dir(path)
31 - if not in_base and not files.is_in_dir(path, "/root"):
32 - raise ValueError("Path is outside of allowed directory")
28 + # if runtime.is_development():
29 + # in_base = files.is_in_base_dir(files.fix_dev_path(path))
30 + # else:
31 + # in_base = files.is_in_base_dir(path)
32 + # if not in_base and not files.is_in_dir(path, "/root"):
33 + # raise ValueError("Path is outside of allowed directory")
34
35 # get file extension and info
36 file_ext = os.path.splitext(path)[1].lower()
37 filename = os.path.basename(path)
38
39 # list of allowed image extensions
39 - image_extensions = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp", ".svg"]
40 + image_extensions = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp", ".svg", ".ico", ".svgz"]
41
42 # # If metadata is requested, return file information
43 # if metadata:
webui/css/messages.css
+2 -2
@@ -263,9 +263,9 @@
263 white-space: nowrap;
264 }
265
266 -.message-body code {
266 +/* .message-body code {
267 white-space: break-spaces;
268 -}
268 +} */
269
270 /* Light mode code-exe styling moved to main terminal block above */
271