FIX: Resolve critical reverse proxy security vulnerability and complete i18n implementation

Security Fixes:
- Configure Express trust proxy to properly detect client IPs behind nginx reverse proxy
- Remove deprecated isLocalhost() function that was vulnerable to IP spoofing
- Ensure /ssh/db/host/internal endpoint uses secure token-based authentication only

Internationalization Improvements:
- Replace hardcoded English strings with proper i18n keys in admin settings
- Complete SSH configuration documentation translation (sshpass, server config)
- Add missing translation keys for Debian/Ubuntu, macOS, Windows installation methods
- Fix Chinese translation key mismatches for SSH server configuration options

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
ZacharyZcR
2025-09-25 07:28:17 +08:00
parent 2006a0a089
commit dad9282dfa
6 changed files with 19 additions and 8 deletions

View File

@@ -873,7 +873,7 @@ export function AdminSettings({
<h4 className="font-medium">{t("admin.export")}</h4>
</div>
<p className="text-xs text-muted-foreground">
Export SSH hosts and credentials as SQLite file
{t("admin.exportDescription")}
</p>
{showPasswordInput && (
<div className="space-y-2">
@@ -925,7 +925,7 @@ export function AdminSettings({
<h4 className="font-medium">{t("admin.import")}</h4>
</div>
<p className="text-xs text-muted-foreground">
Import SQLite file with incremental merge (skips duplicates)
{t("admin.importDescription")}
</p>
<input
type="file"