mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
action.d/cloudflare-token.conf: fixes actionunban retrieving of CF-ID from IP:
force adding parameters to URL as query string (add `-G` to curl); closes gh-3952
This commit is contained in:
parent
e5199aee92
commit
c9b5e845ba
1 changed files with 1 additions and 1 deletions
|
|
@ -50,7 +50,7 @@ actionban = curl -s -X POST "<_cf_api_url>" \
|
|||
# <time> unix timestamp of the ban time
|
||||
# Values: CMD
|
||||
#
|
||||
actionunban = id=$(curl -s -X GET "<_cf_api_url>" \
|
||||
actionunban = id=$(curl -s -G -X GET "<_cf_api_url>" \
|
||||
--data-urlencode "mode=<cfmode>" --data-urlencode "notes=<notes>" --data-urlencode "configuration.target=<cftarget>" --data-urlencode "configuration.value=<ip>" \
|
||||
<_cf_api_prms> \
|
||||
| awk -F"[,:}]" '{for(i=1;i<=NF;i++){if($i~/'id'\042/){print $(i+1)}}}' \
|
||||
|
|
|
|||
Loading…
Reference in a new issue