Fix commit to be a partial admin-focused commit

Issue #4197 -- Commit currently commits all pending changes to the firewall, which could be very, very bad.  This changes to commit to a partial commit of just the admin user acme.sh is using, which should be a dedicated admin user and not shared by anything else.
This commit is contained in:
Hossy 2022-07-19 19:54:15 -05:00 committed by GitHub
parent 1b59b0b739
commit 71de890431
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,8 +71,8 @@ deployer() {
if [ "$type" = 'commit' ]; then if [ "$type" = 'commit' ]; then
export _H1="Content-Type: application/x-www-form-urlencoded" export _H1="Content-Type: application/x-www-form-urlencoded"
cmd=$(printf "%s" "<commit><partial><$_panos_user></$_panos_user></partial></commit>" | _url_encode) cmd=$(printf "%s" "<commit><partial><admin><member>$_panos_user</member></admin></partial></commit>" | _url_encode)
content="type=commit&key=$_panos_key&cmd=$cmd" content="type=commit&action=partial&key=$_panos_key&cmd=$cmd"
fi fi
response=$(_post "$content" "$panos_url" "" "POST") response=$(_post "$content" "$panos_url" "" "POST")
parse_response "$response" "$type" parse_response "$response" "$type"