Skip to content

Commit dda9087

Browse files
committed
Please enter the commit message for your changes. Lines starting
with '' will be ignored, and an empty message aborts the commit. On branch dev Your branch is up to date with 'origin/dev'. Changes to be committed: modified: src/lufus/utils.py
1 parent b46bd7c commit dda9087

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/lufus/utils.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@ def elevate_privileges() -> None:
1616
# Validate theme is a safe filename/path: no path separators, no shell metacharacters,
1717
# and must resolve inside the config directory to prevent path traversal.
1818
theme_val = str(state.theme)
19-
if re.match(r'^[A-Za-z0-9_\-. ]+$', os.path.basename(theme_val)) and ".." not in theme_val:
19+
if re.match(r"^[A-Za-z0-9_\-. ]+$", os.path.basename(theme_val)) and ".." not in theme_val:
2020
env["LUFUS_THEME"] = theme_val
2121
else:
2222
import logging
23-
logging.getLogger("lufus").warning("elevate_privileges: rejected suspicious LUFUS_THEME value %r", theme_val)
23+
24+
logging.getLogger("lufus").warning(
25+
"elevate_privileges: rejected suspicious LUFUS_THEME value %r", theme_val
26+
)
2427

2528
# Preserve DISPLAY and XAUTHORITY for GUI apps under pkexec/sudo
2629
env_vars = ["DISPLAY", "XAUTHORITY", "XDG_RUNTIME_DIR", "WAYLAND_DISPLAY", "PYTHONPATH", "LUFUS_THEME"]

0 commit comments

Comments
 (0)