chaitin / SafeLine

serve as a reverse proxy to protect your web services from attacks and exploits.
https://waf.chaitin.com
GNU General Public License v3.0
11.82k stars 722 forks source link

[Bug] upstream url unsupport underline '_' #985

Closed Sndav closed 4 weeks ago

Sndav commented 1 month ago

What happened?

upstream域名无法添加下划线

How we reproduce?

如图

image

Expected behavior

校验通过

Error log

No response

Lorna0 commented 1 month ago

根据 https://cabforum.org/2018/11/12/ballot-sc12-sunset-of-underscores-in-dnsnames/ ,域名里不建议使用下划线。

如果当作 hostname 的话可以考虑。

Sndav commented 1 month ago
image

不过还是建议增加一下这个功能

Sndav commented 1 month ago

您这个https://cabforum.org/2018/11/12/ballot-sc12-sunset-of-underscores-in-dnsnames/指的是TLS证书中的域名字段,不是dns解析的NAME

Lorna0 commented 1 month ago

您这个https://cabforum.org/2018/11/12/ballot-sc12-sunset-of-underscores-in-dnsnames/指的是TLS证书中的域名字段,不是dns解析的NAME

没错,我的意思就是指 TLS 证书中的域名字段不建议使用下划线,所以不建议域名使用下划线。因为域名一般都需要证书,否则容易有安全问题。

域名中增加下划线确实是存在一定争议的,协议中允许,但是实际运用中可能存在一些问题。

不过考虑到 upstream 不一定是域名,也可能是 hostname,hostname 的要求就宽松多了,我们有空会改成允许下划线。

Lorna0 commented 1 month ago

Released in 6.2.3