消息列循环检测
This commit is contained in:
parent
049ea9812e
commit
89b66d4526
@ -97,8 +97,8 @@ namespace FastGithub.DomainResolve
|
||||
throw new FastGithubException($"dns{dns}解析不到{domain}的ip");
|
||||
}
|
||||
|
||||
// 受干扰的dns,常常返回127.0.0.1来阻断请求
|
||||
if (address.Equals(IPAddress.Loopback))
|
||||
// 不允许域名解析指向FastGithub自身造成消息死循环
|
||||
if (LocalMachine.ContainsIPAddress(address) == true)
|
||||
{
|
||||
throw new FastGithubException($"dns{dns}被污染,解析{domain}为{address}");
|
||||
}
|
||||
|
||||
@ -193,7 +193,7 @@ namespace FastGithub.ReverseProxy
|
||||
private static string GetSubjectName(X509Certificate cert)
|
||||
{
|
||||
var subject = cert.SubjectDN.ToString();
|
||||
if (subject.StartsWith("cn=", StringComparison.OrdinalIgnoreCase))
|
||||
if (subject.StartsWith("CN=", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
subject = subject[3..];
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user