dns_pleskxml.sh: use grep -F when matching interpolated values

fulldomain/txtvalue/root_domain_name were interpolated into grep
regex patterns; match them as fixed strings instead.

from https://github.com/acmesh-official/acme.sh/pull/7031
This commit is contained in:
neil committed 2026-07-10 12:05:28 +08:00
1 parent 90b4795bb1
commit fa763db105
1 file changed
+3 -3
+3 -3
View File
@@ -151,8 +151,8 @@ dns_pleskxml_rm() {
# Extracting the id of the TXT record for the full domain (NOT case-sensitive) and corresponding value # Extracting the id of the TXT record for the full domain (NOT case-sensitive) and corresponding value
recid="$( recid="$(
_value "$reclist" | _value "$reclist" |
grep -i "<host>${fulldomain}.</host>" | grep -Fi "<host>${fulldomain}.</host>" |
grep "<value>${txtvalue}</value>" | grep -F "<value>${txtvalue}</value>" |
sed 's/^.*<id>\([0-9]\{1,\}\)<\/id>.*$/\1/' sed 's/^.*<id>\([0-9]\{1,\}\)<\/id>.*$/\1/'
)" )"
@@ -419,7 +419,7 @@ _pleskxml_get_root_domain() {
_debug "Checking if '$root_domain_name' is managed by the Plesk server..." _debug "Checking if '$root_domain_name' is managed by the Plesk server..."
root_domain_id="$(_value "$output" | grep "<name>$root_domain_name</name>" | _head_n 1 | sed 's/^.*<id>\([0-9]\{1,\}\)<\/id>.*$/\1/')" root_domain_id="$(_value "$output" | grep -F "<name>$root_domain_name</name>" | _head_n 1 | sed 's/^.*<id>\([0-9]\{1,\}\)<\/id>.*$/\1/')"
if [ -n "$root_domain_id" ]; then if [ -n "$root_domain_id" ]; then
# Found a match # Found a match
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.