fix(config): protect operator credentials
Keep first-run access details confined to the active process console and remove development credentials from managed application logs. Treat notification delivery settings as sensitive during backup and restore, preserve private file access across creation and updates, and align the WebUI guidance with the new boundary.
This commit is contained in:
9 files changed
+123
-43
No files matched your search
@@ -606,7 +606,7 @@ export function LogsPage() {
|
||||
<div>
|
||||
<div className="mb-2 flex flex-wrap items-center gap-x-1.5 gap-y-0.5">
|
||||
<span className="text-xs font-medium text-foreground">服务端日志级别</span>
|
||||
<span className="text-xs text-muted-foreground">· 普通日志仅影响控制台 / 实时流;首次登录凭据始终可见;文件等级由环境变量决定,默认为 debug</span>
|
||||
<span className="text-xs text-muted-foreground">· 普通日志仅影响控制台 / 实时流;首次登录凭据仅输出到启动终端;文件等级由环境变量决定,默认为 debug</span>
|
||||
</div>
|
||||
<SkeletonSwap
|
||||
ready={serverLevelReady}
|
||||
|
||||
@@ -379,7 +379,7 @@ export function SystemPanel() {
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle className="flex items-center gap-2 text-sm"><Database className="h-4 w-4" /> 配置备份 / 恢复</CardTitle>
|
||||
<CardDescription>备份外观、通知、系统设置和证书等配置;敏感开关还会包含 OneBot 配置。不含消息数据库。</CardDescription>
|
||||
<CardDescription>备份外观、系统设置和证书等配置;通知渠道与 OneBot 配置仅在包含敏感配置时导出。不含消息数据库。</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent className="flex flex-col gap-4">
|
||||
<div className="flex flex-col gap-2">
|
||||
@@ -388,7 +388,7 @@ export function SystemPanel() {
|
||||
<ToggleSwitch value={exportCreds} onChange={setExportCreds} ariaLabel="导出包含敏感配置" />
|
||||
</div>
|
||||
{exportCreds && (
|
||||
<p className="text-sm leading-relaxed text-red-600 dark:text-red-400">⚠ 将额外包含 WebUI 登录状态、TLS 私钥,以及带访问令牌的 OneBot 配置,请妥善保管。</p>
|
||||
<p className="text-sm leading-relaxed text-red-600 dark:text-red-400">⚠ 将额外包含 WebUI 登录状态、TLS 私钥、通知渠道地址与 OneBot 访问令牌,请妥善保管。</p>
|
||||
)}
|
||||
<div>
|
||||
<Button onClick={exportBackup} disabled={saving} className="gap-1.5">
|
||||
@@ -405,7 +405,7 @@ export function SystemPanel() {
|
||||
<ToggleSwitch value={restoreCreds} onChange={setRestoreCreds} ariaLabel="恢复包含敏感配置" />
|
||||
</div>
|
||||
{restoreCreds && (
|
||||
<p className="text-sm leading-relaxed text-red-600 dark:text-red-400">⚠ 将覆盖当前 WebUI 登录状态、TLS 私钥与 OneBot 配置(含访问令牌);若备份口令未知可能登不进。</p>
|
||||
<p className="text-sm leading-relaxed text-red-600 dark:text-red-400">⚠ 将覆盖当前 WebUI 登录状态、TLS 私钥、通知渠道地址与 OneBot 访问令牌;若备份口令未知可能登不进。</p>
|
||||
)}
|
||||
<input
|
||||
ref={fileRef}
|
||||
|
||||
Reference in new issue
Block a user