修复LiteSSL添加DNS失败

This commit is contained in:
net909
2026-01-25 11:12:41 +08:00
parent d1eaaec650
commit ec16c3fc8b
5 changed files with 12 additions and 4 deletions

View File

@@ -198,7 +198,7 @@ class Domain extends BaseController
if (!empty($id)) {
$select->where('A.id', $id);
} elseif (!empty($kw)) {
$select->whereLike('name|A.remark', '%' . $kw . '%');
$select->whereLike('A.name|A.remark', '%' . $kw . '%');
}
if (!empty($aid)) {
$select->where('A.aid', $aid);

View File

@@ -62,10 +62,14 @@ class customacme implements CertInterface
$dnsList = [];
if (!empty($order['challenges'])) {
$keys = [];
foreach ($order['challenges'] as $opts) {
$key = $opts['key'] . '|' .$opts['value'];
if (in_array($key, $keys)) continue;
$mainDomain = getMainDomain($opts['domain']);
$name = substr($opts['key'], 0, -(strlen($mainDomain) + 1));
$dnsList[$mainDomain][] = ['name' => $name, 'type' => 'TXT', 'value' => $opts['value']];
$keys[] = $key;
}
}

View File

@@ -59,13 +59,17 @@ class litessl implements CertInterface
$dnsList = [];
if (!empty($order['challenges'])) {
$keys = [];
foreach ($order['challenges'] as $opts) {
$key = $opts['key'] . '|' .$opts['value'];
if (in_array($key, $keys)) continue;
$mainDomain = getMainDomain($opts['domain']);
$name = substr($opts['key'], 0, -(strlen($mainDomain) + 1));
/*if (!array_key_exists($mainDomain, $dnsList)) {
$dnsList[$mainDomain][] = ['name' => '@', 'type' => 'CAA', 'value' => '0 issue "litessl.cn"'];
}*/
$dnsList[$mainDomain][] = ['name' => $name, 'type' => 'TXT', 'value' => $opts['value']];
$keys[] = $key;
}
}

View File

@@ -9,7 +9,7 @@
<form onsubmit="return searchSubmit()" method="GET" class="form-inline" id="searchToolbar">
<div class="form-group">
<label>搜索</label>
<input type="text" class="form-control" name="kw" placeholder="AccessKey或备注">
<input type="text" class="form-control" name="kw" placeholder="账户名称或备注">
</div>
<button type="submit" class="btn btn-primary"><i class="fa fa-search"></i> 搜索</button>
<a href="javascript:searchClear()" class="btn btn-default" title="刷新域名账户列表"><i class="fa fa-refresh"></i> 刷新</a>
@@ -54,7 +54,7 @@ $(document).ready(function(){
},
{
field: 'name',
title: 'AccessKey'
title: '账户名称'
},
{
field: 'remark',

View File

@@ -31,7 +31,7 @@ return [
'show_error_msg' => true,
'exception_tmpl' => \think\facade\App::getAppPath() . 'view/exception.tpl',
'version' => '1046',
'version' => '1047',
'dbversion' => '1045'
];