mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-03-04 02:14:40 +01:00
Error out on domain names with wildcards in captive portals
This commit is contained in:
parent
31e9a7d251
commit
8f2be59a82
1 changed files with 6 additions and 0 deletions
|
@ -170,6 +170,12 @@ func ColdStart(proxy *Proxy) (*CaptivePortalHandler, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if strings.Index(ipsStr, "*") != -1 {
|
||||||
|
return nil, fmt.Errorf(
|
||||||
|
"A captive portal rule must use an exact host name at line %d",
|
||||||
|
1+lineNo,
|
||||||
|
)
|
||||||
|
}
|
||||||
var ips []net.IP
|
var ips []net.IP
|
||||||
for _, ip := range strings.Split(ipsStr, ",") {
|
for _, ip := range strings.Split(ipsStr, ",") {
|
||||||
ipStr := strings.TrimSpace(ip)
|
ipStr := strings.TrimSpace(ip)
|
||||||
|
|
Loading…
Add table
Reference in a new issue