`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
pull/3948/head
Sergey G. Brester 2025-03-01 20:19:35 +01:00 committed by GitHub
parent e5199aee92
commit c9b5e845ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ actionban = curl -s -X POST "<_cf_api_url>" \
# <time> unix timestamp of the ban time # <time> unix timestamp of the ban time
# Values: CMD # 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>" \ --data-urlencode "mode=<cfmode>" --data-urlencode "notes=<notes>" --data-urlencode "configuration.target=<cftarget>" --data-urlencode "configuration.value=<ip>" \
<_cf_api_prms> \ <_cf_api_prms> \
| awk -F"[,:}]" '{for(i=1;i<=NF;i++){if($i~/'id'\042/){print $(i+1)}}}' \ | awk -F"[,:}]" '{for(i=1;i<=NF;i++){if($i~/'id'\042/){print $(i+1)}}}' \