-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Hi, and first of all thanks for sharing this great and very well documented project!
Issue
The argument geoip-shell reset performs destructive actions with no warning or confirmation prompt.
geoip-shell/geoip-shell-manage.sh
Lines 597 to 602 in 29543d0
| reset) | |
| rm_iplists_rules | |
| rm_all_data | |
| [ -f "$conf_file" ] && { printf '%s\n' "Deleting the config file '$conf_file'..."; rm -f "$conf_file"; } | |
| rm_setupdone | |
| die 0 ;; |
Because reset/restore are easy to confuse, it’s possible to wipe the config by running the wrong action (don't ask me how I know this :D).
Steps to reproduce
- Configure geoip-shell
- Run
geoip-shell reset - Observe it immediately wipes geoip rules and config without asking.
Proposed change
Add a safeguard against accidental execution:
Are you sure you wish to reset geoip config and firewall geoip rules? (y/N)
Metadata
Metadata
Assignees
Labels
No labels