mirror of
https://github.com/tw93/Mole.git
synced 2026-02-08 16:44:19 +00:00
Merge branch 'dev' of github.com:tw93/Mole into dev
This commit is contained in:
@@ -56,9 +56,9 @@ if [[ -f "$HOME/.config/mole/whitelist" ]]; then
|
||||
# Expand tilde to home directory
|
||||
[[ "$line" == ~* ]] && line="${line/#~/$HOME}"
|
||||
|
||||
# Stricter path validation (no spaces, wildcards only at end)
|
||||
# Allow: letters, numbers, /, _, ., -, @ and * only at the end
|
||||
if [[ ! "$line" =~ ^[a-zA-Z0-9/_.@-]+(\*)?$ ]]; then
|
||||
# Path validation with support for spaces and wildcards
|
||||
# Allow: letters, numbers, /, _, ., -, @, spaces, and * anywhere in path
|
||||
if [[ ! "$line" =~ ^[a-zA-Z0-9/_.@\ *-]+$ ]]; then
|
||||
WHITELIST_WARNINGS+=("Invalid path format: $line")
|
||||
continue
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user