|
|
|
@ -536,9 +536,9 @@ namespace UMC.Host
|
|
|
|
|
{
|
|
|
|
|
var host = str[1];
|
|
|
|
|
|
|
|
|
|
if (System.Text.RegularExpressions.Regex.IsMatch(host, @"^([a-z0-9]([a-z0-9\-]{0,61}[a-z0-9])?\.)+[a-z0-9]{1,6}$") == false)
|
|
|
|
|
if (System.Text.RegularExpressions.Regex.IsMatch(host, @"^([a-z0-9\*]([a-z0-9\-]{0,61}[a-z0-9])?\.)+[a-z0-9]{1,6}$") == false)
|
|
|
|
|
{
|
|
|
|
|
pipeServer.Write(System.Text.Encoding.UTF8.GetBytes($"证书域名格式不正确。\r\n"));
|
|
|
|
|
pipeServer.Write(System.Text.Encoding.UTF8.GetBytes($"域名格式不正确。\r\n"));
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -559,9 +559,9 @@ namespace UMC.Host
|
|
|
|
|
var hs = JSON.Deserialize<WebMeta>(jsonStr);
|
|
|
|
|
if (string.Equals(hs["code"], "success"))
|
|
|
|
|
{
|
|
|
|
|
if (UMC.Net.Certificater.Certificates.TryGetValue(host, out var _v) == false)
|
|
|
|
|
if (UMC.Net.Certificater.Certificates.TryGetValue(hs["domain"] ?? host, out var _v) == false)
|
|
|
|
|
{
|
|
|
|
|
_v = new Certificater() { Name = host, Status = 0 };
|
|
|
|
|
_v = new Certificater() { Name = hs["domain"] ?? host, Status = 0 };
|
|
|
|
|
UMC.Net.Certificater.Certificates[_v.Name] = _v;
|
|
|
|
|
}
|
|
|
|
|
_v.Status = -1;
|
|
|
|
|