mirror of
https://github.com/nginx-proxy/docker-letsencrypt-nginx-proxy-companion
synced 2024-11-26 08:53:52 +01:00
fix: prevent endless loop of wildcard enumeration
This commit is contained in:
parent
2b5fd94271
commit
dddd7a5a82
@ -43,7 +43,11 @@ function ascending_wildcard_locations {
|
||||
until [[ "$domain" =~ $regex ]]; do
|
||||
first_label="${domain%%.*}"
|
||||
domain="${domain/${first_label}./}"
|
||||
echo "*.${domain}"
|
||||
if [[ -z "$domain" ]]; then
|
||||
return
|
||||
else
|
||||
echo "*.${domain}"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
@ -59,7 +63,11 @@ function descending_wildcard_locations {
|
||||
until [[ "$domain" =~ $regex ]]; do
|
||||
last_label="${domain##*.}"
|
||||
domain="${domain/.${last_label}/}"
|
||||
echo "${domain}.*"
|
||||
if [[ -z "$domain" ]]; then
|
||||
return
|
||||
else
|
||||
echo "${domain}.*"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user