mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2026-08-13 12:33:30 +02:00
dns_regru: require a dot boundary in root zone matching
_get_root matched a registered domain anywhere as a substring of the challenge domain, so with both "test.com.ru" and "subtest.com.ru" in the account, issuing for subtest.com.ru wrongly picked test.com.ru as the root (it is a substring of "sub-test.com.ru"). Anchor the match to a '.' boundary so a shorter domain no longer matches a longer subdomain label. Fixes the issue reported in #5036 (thanks @koledas) Closes #5036
This commit is contained in:
parent
defd64022d
commit
7def43481a
1 changed files with 2 additions and 2 deletions
|
|
@ -96,8 +96,8 @@ _get_root() {
|
|||
|
||||
for ITEM in ${domains_list}; do
|
||||
IDN_ITEM=${ITEM}
|
||||
case "${domain}" in
|
||||
*${IDN_ITEM}*)
|
||||
case ".${domain}" in
|
||||
*.${IDN_ITEM}*)
|
||||
_domain="$(_idn "${ITEM}")"
|
||||
_debug _domain "${_domain}"
|
||||
return 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue