e0df32f42b
When shell=True was removed for security, the command was parsed with shlex.split(posix=False) on Windows, which keeps the quote characters inside the tokens — so a quoted path like "C:\Program Files\app.exe" became an argv[0] containing literal quotes and CreateProcess couldn't find it, so app macros silently did nothing. Fix: on Windows pass the command string to Popen (shell=False) and let CreateProcess parse it (handles quoted paths, still no shell/metacharacter chaining); on POSIX keep shlex.split. Verified a real launch works and shell redirection stays blocked. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
23 lines
567 B
Python
23 lines
567 B
Python
# Configuration and constants for MacroPad Server
|
|
|
|
VERSION = "1.1.1"
|
|
DEFAULT_PORT = 40000
|
|
SETTINGS_FILE = "settings.json"
|
|
|
|
# UI Theme colors
|
|
THEME = {
|
|
'bg_color': "#2e2e2e",
|
|
'fg_color': "#ffffff",
|
|
'highlight_color': "#3e3e3e",
|
|
'accent_color': "#007acc",
|
|
'button_bg': "#505050",
|
|
'button_fg': "#ffffff",
|
|
'tab_bg': "#404040",
|
|
'tab_selected': "#007acc",
|
|
'accent_hover': "#0096ff",
|
|
'danger_color': "#dc3545",
|
|
'danger_hover': "#c82333"
|
|
}
|
|
|
|
# File extensions for images
|
|
IMAGE_EXTENSIONS = [".jpg", ".jpeg", ".png", ".gif", ".bmp"] |