mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 03:52:50 +08:00
fix: harden console self-update for real release packages
- Copy the restart runner with every runtime import (restart-runner.js, code-swap.js, version.js, update-state.js) and fail the apply when the runner exits during the startup grace window instead of reporting a task that never restarted. - Accept official tar/zip relative symlinks that stay inside the extraction root while still refusing absolute, drive-qualified, escaping and hard-link entries. - Have the restart runner take over the update lock for the same task, keep live or unreadable locks, and copy EXDEV entries into a temporary name before renaming so a partial copy cannot replace the previous tree. - Disable console apply for Windows release packages with WINDOWS_APPLY_UNVERIFIED while still reporting available versions. - Clarify in zh/en docs and five-language console copy that SHA256SUMS.txt is an integrity checksum, not a signature, and that verification targets the official Linux x64 build-release.yml package. - Add tests for the failing EXDEV copy, live/unreadable/dead locks, same-task lock takeover, a real spawned runner compiled from source, and initialization leaving another live process's task untouched.
This commit is contained in:
1 parent
eb6c4ba857
commit
699e606da5
15 files changed
+793
-90
No files matched your search
@@ -303,6 +303,7 @@
|
||||
</div>
|
||||
<div v-if="availableUpdates.length" class="update-release-list">
|
||||
<strong>{{ tr('updateSelectRelease') }}</strong>
|
||||
<p class="field-help">{{ tr('updateChecksumNotice') }}</p>
|
||||
<label v-for="release in availableUpdates" :key="release.version" class="update-release-row">
|
||||
<input v-model="selectedVersion" type="radio" :value="release.version" :disabled="!release.canApply || updateApplying" />
|
||||
<span><strong>v{{ release.version }}</strong> <small>{{ formatDate(release.publishedAt) }}</small></span>
|
||||
@@ -350,6 +351,7 @@ function blockedReasonText(code: string | null) {
|
||||
case 'DEPLOYMENT_SOURCE': return tr('updateBlockedSource');
|
||||
case 'PLATFORM_UNSUPPORTED': return tr('updateBlockedPlatform');
|
||||
case 'ARCH_UNSUPPORTED': return tr('updateBlockedArch');
|
||||
case 'WINDOWS_APPLY_UNVERIFIED': return tr('updateBlockedWindows');
|
||||
case 'UPDATE_ASSET_UNAVAILABLE': return tr('updateAssetMissing');
|
||||
case 'UPDATE_CHECKSUM_MISSING': return tr('updateChecksumMissing');
|
||||
default: return tr('updateBlockedUnavailable');
|
||||
|
||||
@@ -10,7 +10,7 @@ const zh = {
|
||||
adminBrowserSessions: "浏览器会话", adminBrowserSessionsLead: "这里只显示通过此 WebSpeak 实例连接的用户;结束会话会断开对应浏览器。完整 TS 成员列表见 TeamSpeak 服务管理。",
|
||||
adminInviteScope: "这些邀请链接由当前 WebSpeak 实例生成和管理。",
|
||||
adminLogsSection: "连接与日志", adminMaintenanceSection: "诊断与备份",
|
||||
updateTitle: "版本更新", updateLead: "检查官方 GitHub Releases 中的正式版本。发布包安装可在控制台校验并切换版本;Docker 和源码运行只显示检查结果。",
|
||||
updateTitle: "版本更新", updateLead: "检查官方 GitHub Releases 中的正式版本。Linux x64 发布包(已按官方包形态验证)可在控制台校验并切换版本;Docker 和源码运行只显示检查结果。",
|
||||
updateCurrentVersion: "当前版本", updateDeploymentMode: "部署模式", updateArchitecture: "平台与架构",
|
||||
updateModeDocker: "Docker Compose", updateModeReleasePackage: "发布包", updateModeSource: "源码运行",
|
||||
updateCanApply: "可在此控制台更新", updateCannotApply: "此部署不能在此应用更新",
|
||||
@@ -22,6 +22,8 @@ const zh = {
|
||||
updateBlockedDocker: "容器内不能替换镜像。请保留 webspeak-data volume,在宿主机执行 docker compose pull && docker compose up -d;不要执行 docker compose down -v。",
|
||||
updateBlockedSource: "源码运行没有捆绑运行时,控制台无法安全切换版本。请拉取源码后自行构建(npm ci && npm run build && npm run web:build),或改用发布包/Docker Compose。",
|
||||
updateBlockedPlatform: "当前平台没有官方发布包,只能检查版本。", updateBlockedArch: "当前架构没有官方发布包,只能检查版本。",
|
||||
updateBlockedWindows: "Windows 发布包的控制台更新尚未在真实 Windows 环境验证,已禁用;请下载新版发布包后手动替换。",
|
||||
updateChecksumNotice: "SHA256SUMS.txt 只用于 SHA-256 完整性校验和,不是数字签名。",
|
||||
updateBlockedUnavailable: "此实例未启用控制台更新。", updateTaskTitle: "更新任务",
|
||||
updateStatusDownloading: "正在下载", updateStatusVerifying: "正在校验", updateStatusExtracting: "正在解包", updateStatusStaging: "正在暂存",
|
||||
updateStatusRestarting: "正在重启", updateStatusSucceeded: "更新成功", updateStatusFailed: "更新失败",
|
||||
@@ -55,7 +57,7 @@ const en = {
|
||||
adminBrowserSessions: "Browser sessions", adminBrowserSessionsLead: "Only users connected through this WebSpeak instance are listed here. Ending a session disconnects that browser. Use TeamSpeak service management for the full TS client list.",
|
||||
adminInviteScope: "These invite links are created and managed by this WebSpeak instance.",
|
||||
adminLogsSection: "Connections & logs", adminMaintenanceSection: "Diagnostics & backups",
|
||||
updateTitle: "Version update", updateLead: "Check stable versions in the official GitHub Releases. Release-package installs can verify and switch versions here; Docker and source installs only show check results.",
|
||||
updateTitle: "Version update", updateLead: "Check stable versions in the official GitHub Releases. On verified Linux x64 release packages the console can verify and switch versions; Docker and source installs only show check results.",
|
||||
updateCurrentVersion: "Current version", updateDeploymentMode: "Deployment", updateArchitecture: "Platform & architecture",
|
||||
updateModeDocker: "Docker Compose", updateModeReleasePackage: "Release package", updateModeSource: "From source",
|
||||
updateCanApply: "Update from this console", updateCannotApply: "This deployment cannot apply updates here",
|
||||
@@ -67,6 +69,8 @@ const en = {
|
||||
updateBlockedDocker: "An image cannot be replaced from inside the container. Keep the webspeak-data volume and run docker compose pull && docker compose up -d on the host. Never run docker compose down -v.",
|
||||
updateBlockedSource: "Source installs have no bundled runtime, so the console cannot switch versions safely. Pull the source and rebuild (npm ci && npm run build && npm run web:build), or use a release package/Docker Compose.",
|
||||
updateBlockedPlatform: "No official package exists for this platform; only version checks are available.", updateBlockedArch: "No official package exists for this architecture; only version checks are available.",
|
||||
updateBlockedWindows: "Console updates for Windows release packages are disabled until they are verified on a real Windows install. Download the new package and replace it manually.",
|
||||
updateChecksumNotice: "SHA256SUMS.txt is an integrity checksum only, not a digital signature.",
|
||||
updateBlockedUnavailable: "Console updates are not enabled for this instance.", updateTaskTitle: "Update task",
|
||||
updateStatusDownloading: "Downloading", updateStatusVerifying: "Verifying", updateStatusExtracting: "Extracting", updateStatusStaging: "Staging",
|
||||
updateStatusRestarting: "Restarting", updateStatusSucceeded: "Update succeeded", updateStatusFailed: "Update failed",
|
||||
@@ -99,7 +103,7 @@ const de = {
|
||||
adminBrowserSessions: "Browsersitzungen", adminBrowserSessionsLead: "Hier stehen nur Nutzer dieser WebSpeak-Instanz. Beenden trennt den jeweiligen Browser. Die vollständige TS-Mitgliederliste befindet sich in der TeamSpeak-Verwaltung.",
|
||||
adminInviteScope: "Diese Einladungslinks werden von dieser WebSpeak-Instanz erstellt und verwaltet.",
|
||||
adminLogsSection: "Verbindungen & Protokolle", adminMaintenanceSection: "Diagnose & Sicherungen",
|
||||
updateTitle: "Versionsaktualisierung", updateLead: "Stabile Versionen aus den offiziellen GitHub Releases prüfen. Release-Pakete können hier geprüft und gewechselt werden; Docker- und Quellinstallationen zeigen nur Prüfergebnisse.",
|
||||
updateTitle: "Versionsaktualisierung", updateLead: "Stabile Versionen aus den offiziellen GitHub Releases prüfen. Verifizierte Linux-x64-Release-Pakete können hier geprüft und gewechselt werden; Docker- und Quellinstallationen zeigen nur Prüfergebnisse.",
|
||||
updateCurrentVersion: "Aktuelle Version", updateDeploymentMode: "Bereitstellung", updateArchitecture: "Plattform & Architektur",
|
||||
updateModeDocker: "Docker Compose", updateModeReleasePackage: "Release-Paket", updateModeSource: "Aus Quellen",
|
||||
updateCanApply: "In dieser Konsole aktualisieren", updateCannotApply: "Diese Bereitstellung kann hier nicht aktualisiert werden",
|
||||
@@ -111,6 +115,8 @@ const de = {
|
||||
updateBlockedDocker: "Ein Image kann nicht im Container ersetzt werden. Das Volume webspeak-data behalten und auf dem Host docker compose pull && docker compose up -d ausführen. Niemals docker compose down -v verwenden.",
|
||||
updateBlockedSource: "Quellinstallationen haben keine mitgelieferte Laufzeit; die Konsole kann Versionen nicht sicher wechseln. Quellen aktualisieren und neu bauen (npm ci && npm run build && npm run web:build) oder Release-Paket/Docker Compose verwenden.",
|
||||
updateBlockedPlatform: "Für diese Plattform gibt es kein offizielles Paket; nur Versionsprüfungen sind möglich.", updateBlockedArch: "Für diese Architektur gibt es kein offizielles Paket; nur Versionsprüfungen sind möglich.",
|
||||
updateBlockedWindows: "Konsolen-Updates für Windows-Release-Pakete sind deaktiviert, bis sie auf einer echten Windows-Installation geprüft wurden. Laden Sie das neue Paket herunter und ersetzen Sie es manuell.",
|
||||
updateChecksumNotice: "SHA256SUMS.txt ist nur eine Integritätsprüfsumme, keine digitale Signatur.",
|
||||
updateBlockedUnavailable: "Konsolen-Updates sind für diese Instanz nicht aktiviert.", updateTaskTitle: "Update-Aufgabe",
|
||||
updateStatusDownloading: "Wird heruntergeladen", updateStatusVerifying: "Wird geprüft", updateStatusExtracting: "Wird entpackt", updateStatusStaging: "Wird bereitgestellt",
|
||||
updateStatusRestarting: "Neustart", updateStatusSucceeded: "Update erfolgreich", updateStatusFailed: "Update fehlgeschlagen",
|
||||
@@ -143,7 +149,7 @@ const ru = {
|
||||
adminBrowserSessions: "Сеансы браузеров", adminBrowserSessionsLead: "Здесь только пользователи этого экземпляра WebSpeak. Завершение сеанса отключает соответствующий браузер. Полный список участников TS доступен в управлении TeamSpeak.",
|
||||
adminInviteScope: "Эти ссылки-приглашения создаются и управляются текущим экземпляром WebSpeak.",
|
||||
adminLogsSection: "Подключения и журналы", adminMaintenanceSection: "Диагностика и копии",
|
||||
updateTitle: "Обновление версии", updateLead: "Проверка стабильных версий в официальных GitHub Releases. Установки из пакета могут проверить и сменить версию здесь; Docker и исходники показывают только результат проверки.",
|
||||
updateTitle: "Обновление версии", updateLead: "Проверка стабильных версий в официальных GitHub Releases. Для проверенных релизных пакетов Linux x64 консоль может проверить и сменить версию; Docker и исходники показывают только результат проверки.",
|
||||
updateCurrentVersion: "Текущая версия", updateDeploymentMode: "Развёртывание", updateArchitecture: "Платформа и архитектура",
|
||||
updateModeDocker: "Docker Compose", updateModeReleasePackage: "Пакет релиза", updateModeSource: "Из исходников",
|
||||
updateCanApply: "Можно обновить из консоли", updateCannotApply: "Это развёртывание нельзя обновить здесь",
|
||||
@@ -155,6 +161,8 @@ const ru = {
|
||||
updateBlockedDocker: "Образ нельзя заменить изнутри контейнера. Сохраните том webspeak-data и выполните на хосте docker compose pull && docker compose up -d. Никогда не запускайте docker compose down -v.",
|
||||
updateBlockedSource: "В установке из исходников нет встроенной среды выполнения, поэтому консоль не может безопасно сменить версию. Обновите исходники и пересоберите (npm ci && npm run build && npm run web:build) или используйте пакет релиза/Docker Compose.",
|
||||
updateBlockedPlatform: "Для этой платформы нет официального пакета; доступна только проверка версий.", updateBlockedArch: "Для этой архитектуры нет официального пакета; доступна только проверка версий.",
|
||||
updateBlockedWindows: "Обновление из консоли для релизных пакетов Windows отключено до проверки на реальной установке Windows. Скачайте новый пакет и замените его вручную.",
|
||||
updateChecksumNotice: "SHA256SUMS.txt — только контрольная сумма целостности, а не цифровая подпись.",
|
||||
updateBlockedUnavailable: "Обновление из консоли для этого экземпляра не включено.", updateTaskTitle: "Задача обновления",
|
||||
updateStatusDownloading: "Скачивание", updateStatusVerifying: "Проверка", updateStatusExtracting: "Распаковка", updateStatusStaging: "Подготовка",
|
||||
updateStatusRestarting: "Перезапуск", updateStatusSucceeded: "Обновление выполнено", updateStatusFailed: "Обновление не удалось",
|
||||
@@ -187,7 +195,7 @@ const ja = {
|
||||
adminBrowserSessions: "ブラウザーセッション", adminBrowserSessionsLead: "この WebSpeak 経由の利用者だけを表示します。終了すると該当のブラウザーが切断されます。TS の全メンバーは TeamSpeak サービス管理で確認できます。",
|
||||
adminInviteScope: "この招待リンクは現在の WebSpeak インスタンスが発行・管理します。",
|
||||
adminLogsSection: "接続とログ", adminMaintenanceSection: "診断とバックアップ",
|
||||
updateTitle: "バージョン更新", updateLead: "公式 GitHub Releases の安定版を確認します。リリースパッケージではここで検証して切り替えられます。Docker とソース実行は確認結果のみ表示します。",
|
||||
updateTitle: "バージョン更新", updateLead: "公式 GitHub Releases の安定版を確認します。検証済みの Linux x64 リリースパッケージではここで検証して切り替えられます。Docker とソース実行は確認結果のみ表示します。",
|
||||
updateCurrentVersion: "現在のバージョン", updateDeploymentMode: "デプロイ", updateArchitecture: "プラットフォームとアーキテクチャ",
|
||||
updateModeDocker: "Docker Compose", updateModeReleasePackage: "リリースパッケージ", updateModeSource: "ソース実行",
|
||||
updateCanApply: "このコンソールから更新できます", updateCannotApply: "このデプロイではここから更新できません",
|
||||
@@ -199,6 +207,8 @@ const ja = {
|
||||
updateBlockedDocker: "コンテナ内からイメージは置き換えられません。webspeak-data ボリュームを保持し、ホストで docker compose pull && docker compose up -d を実行してください。docker compose down -v は実行しないでください。",
|
||||
updateBlockedSource: "ソース実行には同梱ランタイムがないため、安全にバージョンを切り替えられません。ソースを取得して再ビルドする(npm ci && npm run build && npm run web:build)か、リリースパッケージ/Docker Compose を使用してください。",
|
||||
updateBlockedPlatform: "このプラットフォーム向けの公式パッケージがないため、バージョン確認のみ可能です。", updateBlockedArch: "このアーキテクチャ向けの公式パッケージがないため、バージョン確認のみ可能です。",
|
||||
updateBlockedWindows: "Windows リリースパッケージのコンソール更新は、実際の Windows 環境で検証するまで無効です。新しいパッケージをダウンロードして手動で置き換えてください。",
|
||||
updateChecksumNotice: "SHA256SUMS.txt は整合性確認用のチェックサムであり、デジタル署名ではありません。",
|
||||
updateBlockedUnavailable: "このインスタンスではコンソール更新が有効になっていません。", updateTaskTitle: "更新タスク",
|
||||
updateStatusDownloading: "ダウンロード中", updateStatusVerifying: "検証中", updateStatusExtracting: "展開中", updateStatusStaging: "ステージング中",
|
||||
updateStatusRestarting: "再起動中", updateStatusSucceeded: "更新成功", updateStatusFailed: "更新失敗",
|
||||
|
||||
Reference in new issue
Block a user