diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d9fc6f..bb2e772 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.8.77 + +- Bridge: 자동 로그인 유지 설정을 확인하는 첫 화면 검사의 시간 제한이 1.5초로 고정되어, 기기가 많은 대시보드(요소 2만 개 수준)에서 느린 호스트(예: Intel N100)일 때 `ui_timeout`으로 끝날 수 있던 문제를 수정했습니다. 이 검사도 이후 단계와 같은 단계별 시간 제한(기본 3초, 최대 5초)을 씁니다. 검사 내용과 판단 방식은 바뀌지 않았습니다. +- 이 변경은 Bridge 앱 업데이트가 필요합니다. Bridge 앱과 HACS 통합 버전은 1.8.77입니다. 통합 코드는 바뀌지 않았습니다. + ## 1.8.76 - 보안: Bridge 컨테이너의 Node.js를 체크섬 검증된 24.22.3으로 올렸습니다. 2026-11-11 Node.js 보안 릴리스(CVE-2026-123864 HTTPS 힙 노출, CVE-2026-123877 `https.Agent` TLS 세션 재사용 인증서 검증 우회, CVE-2026-123872 TLS 재협상 servername 변경 등 HTTP/2·TLS 취약점 16건)를 반영합니다. CI도 같은 버전을 씁니다. diff --git a/addon/smartthings_web_bridge/CHANGELOG.md b/addon/smartthings_web_bridge/CHANGELOG.md index 2641572..7bac126 100644 --- a/addon/smartthings_web_bridge/CHANGELOG.md +++ b/addon/smartthings_web_bridge/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.8.77 + +- Bridge: 자동 로그인 유지 설정을 확인하는 첫 화면 검사의 시간 제한이 1.5초로 고정되어, 기기가 많은 대시보드(요소 2만 개 수준)에서 느린 호스트(예: Intel N100)일 때 `ui_timeout`으로 끝날 수 있던 문제를 수정했습니다. 이 검사도 이후 단계와 같은 단계별 시간 제한(기본 3초, 최대 5초)을 씁니다. 검사 내용과 판단 방식은 바뀌지 않았습니다. +- 이 변경은 Bridge 앱 업데이트가 필요합니다. Bridge 앱과 HACS 통합 버전은 1.8.77입니다. 통합 코드는 바뀌지 않았습니다. + ## 1.8.76 - 보안: Bridge 컨테이너의 Node.js를 체크섬 검증된 24.22.3으로 올렸습니다. 2026-11-11 Node.js 보안 릴리스(CVE-2026-123864 HTTPS 힙 노출, CVE-2026-123877 `https.Agent` TLS 세션 재사용 인증서 검증 우회, CVE-2026-123872 TLS 재협상 servername 변경 등 HTTP/2·TLS 취약점 16건)를 반영합니다. CI도 같은 버전을 씁니다. diff --git a/addon/smartthings_web_bridge/config.yaml b/addon/smartthings_web_bridge/config.yaml index 6d21cfb..2438626 100644 --- a/addon/smartthings_web_bridge/config.yaml +++ b/addon/smartthings_web_bridge/config.yaml @@ -1,7 +1,7 @@ name: SmartThings Web Bridge slug: smartthings_web_bridge description: Headed Chromium bridge for observing SmartThings Web traffic from Home Assistant. -version: 1.8.76 +version: 1.8.77 url: https://github.com/1bobby-git/HA-SmartThings_Web startup: services boot: auto diff --git a/bridge/src/browser/native-login-policy.ts b/bridge/src/browser/native-login-policy.ts index d167962..e54455b 100644 --- a/bridge/src/browser/native-login-policy.ts +++ b/bridge/src/browser/native-login-policy.ts @@ -81,9 +81,12 @@ export async function ensureNativeKeepSignedIn( if (!options.enabled) return report("disabled", "automation_disabled"); if (!nativeLoginTarget(target) || page.url() !== target || page.isClosed()) return report("attention", "invalid_target", false); if (!supportsNativeLoginPolicy(page)) return report("attention", "browser_unsupported"); + // One per-step budget for every DOM probe of this run. The guard scans the whole document; a fixed 1.5 s + // bound timed out on large dashboards on slow hosts while every later probe already allowed `timeout`. + const timeout = Math.max(100, Math.min(5_000, options.timeoutMs ?? 3_000)); let settingsOpen = false; try { - const guard = await bounded(page.evaluate!(inspectLoginSettingsDom, { action: "guard", marker: "", target }), 1_500); + const guard = await bounded(page.evaluate!(inspectLoginSettingsDom, { action: "guard", marker: "", target }), timeout); settingsOpen = guard.settingsOpen === true; if (guard.result === "blocked" || guard.result === "ambiguous") return report("attention", guard.reason ?? (guard.result === "ambiguous" ? "ambiguous" : "blocked"), false); } catch { return report("attention", "ui_timeout", false); } @@ -96,7 +99,6 @@ export async function ensureNativeKeepSignedIn( if (existingPreference?.state === "enabled") return { report: existingPreference, clean: !settingsOpen }; const marker = randomUUID(); const selector = `[${MARKER}="${marker}"]`; - const timeout = Math.max(100, Math.min(5_000, options.timeoutMs ?? 3_000)); const valid = () => !page.isClosed() && page.url() === target && (options.canContinue?.() ?? true); const focusOwnedPage = async () => { if (!valid()) throw new Error("page_changed"); diff --git a/bridge/src/runtime.ts b/bridge/src/runtime.ts index d0a0664..df199ed 100644 --- a/bridge/src/runtime.ts +++ b/bridge/src/runtime.ts @@ -119,7 +119,7 @@ type ObservableContext = BrowserContextLike & { newCDPSession?: (page: BrowserPageLike) => Promise; }; -const bridgeVersion = "1.8.76"; +const bridgeVersion = "1.8.77"; const SESSION_TOUCH_INTERVAL_MS = 5 * 60_000; const DETAIL_DISCOVERY_INTERVAL_MS = 15_000; const PROFILE_MAINTENANCE_REQUIRED_FILE = ".profile-maintenance-required"; diff --git a/bridge/tests/runtime.test.ts b/bridge/tests/runtime.test.ts index 95eb687..5b465de 100644 --- a/bridge/tests/runtime.test.ts +++ b/bridge/tests/runtime.test.ts @@ -1013,7 +1013,7 @@ describe("createBridgeRuntime", () => { await runtime.browserStartup; expect(log.info.mock.calls.slice(0, 14)).toEqual([ - ["bridge_init:version:1.8.76:home_monitor_direct"], + ["bridge_init:version:1.8.77:home_monitor_direct"], ["bridge_init:data_paths"], ["bridge_init:data_paths:data_dir"], ["bridge_init:data_paths:profile_dir"], diff --git a/custom_components/smartthings_web/manifest.json b/custom_components/smartthings_web/manifest.json index c015f28..da266d9 100644 --- a/custom_components/smartthings_web/manifest.json +++ b/custom_components/smartthings_web/manifest.json @@ -10,5 +10,5 @@ "iot_class": "cloud_push", "issue_tracker": "https://github.com/1bobby-git/HA-SmartThings_Web/issues", "requirements": [], - "version": "1.8.76" + "version": "1.8.77" } diff --git a/package-lock.json b/package-lock.json index b9b1597..77880bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ha-smartthings-web", - "version": "1.8.76", + "version": "1.8.77", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ha-smartthings-web", - "version": "1.8.76", + "version": "1.8.77", "license": "MIT", "dependencies": { "playwright-core": "1.65.0" diff --git a/package.json b/package.json index c653314..fd5048c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ha-smartthings-web", - "version": "1.8.76", + "version": "1.8.77", "private": true, "type": "module", "packageManager": "npm@11.12.1", diff --git a/protocol/version.json b/protocol/version.json index d5d7e88..f8ebd0b 100644 --- a/protocol/version.json +++ b/protocol/version.json @@ -1,5 +1,5 @@ { - "bridge_version": "1.8.76", + "bridge_version": "1.8.77", "protocol_version": 6, "playwright_version": "1.65.0", "expected_chromium_version": "158.0.8127.18", diff --git a/release-notes/1.8.77.md b/release-notes/1.8.77.md new file mode 100644 index 0000000..5056241 --- /dev/null +++ b/release-notes/1.8.77.md @@ -0,0 +1,11 @@ +# 1.8.77 + +Bridge의 자동 로그인 유지 설정 검사 안정성 수정입니다. + +- 자동 로그인 유지 설정을 확인하는 첫 화면 검사의 시간 제한이 1.5초로 고정되어 있어, 기기가 많은 대시보드에서 느린 호스트일 때 `ui_timeout`으로 끝날 수 있었습니다. 이제 이후 단계와 같은 단계별 시간 제한(기본 3초, 최대 5초)을 씁니다. +- 검사 내용, 판단 방식, 화면 변경 동작은 바뀌지 않았습니다. 통합 코드도 바뀌지 않았습니다. + +## 업데이트 + +1. Bridge 앱을 1.8.77로 업데이트합니다. 업데이트 중 Bridge가 다시 시작됩니다. +2. HACS 통합도 버전 정렬을 위해 1.8.77로 업데이트합니다. Home Assistant 재시작은 필요 없습니다. diff --git a/tests/addon-config.test.ts b/tests/addon-config.test.ts index 37e04ef..fe571c7 100644 --- a/tests/addon-config.test.ts +++ b/tests/addon-config.test.ts @@ -10,22 +10,22 @@ const standaloneDockerfile = () => readText("docker/Dockerfile"); const composeConfig = () => YAML.parse(readText("docker/compose.example.yaml")) as Record; describe("Home Assistant add-on metadata", () => { - test("packages the Node.js 24.22.3 security update as version 1.8.76", () => { + test("packages the native login guard timeout fix as version 1.8.77", () => { const config = addonConfig(); const packageMetadata = JSON.parse(readText("package.json")) as Record; const protocolMetadata = JSON.parse(readText("protocol/version.json")) as Record; const runtime = readText("bridge/src/runtime.ts"); const changelog = readText("addon/smartthings_web_bridge/CHANGELOG.md"); - expect(config.version).toBe("1.8.76"); + expect(config.version).toBe("1.8.77"); expect(config.homeassistant_api).toBe(true); expect(config.hassio_api).toBe(true); expect(config.discovery).toEqual(["smartthings_web"]); - expect(packageMetadata.version).toBe("1.8.76"); - expect(protocolMetadata.bridge_version).toBe("1.8.76"); + expect(packageMetadata.version).toBe("1.8.77"); + expect(protocolMetadata.bridge_version).toBe("1.8.77"); expect(protocolMetadata.protocol_version).toBe(6); - expect(runtime).toContain('const bridgeVersion = "1.8.76";'); - expect(changelog).toContain("## 1.8.76"); + expect(runtime).toContain('const bridgeVersion = "1.8.77";'); + expect(changelog).toContain("## 1.8.77"); expect(changelog).toContain("## 1.8.38"); expect(changelog).toContain("## 1.8.37"); expect(changelog).toContain("## 1.8.12"); diff --git a/tests/protocol-version-contract.test.ts b/tests/protocol-version-contract.test.ts index 26abf12..a57bf21 100644 --- a/tests/protocol-version-contract.test.ts +++ b/tests/protocol-version-contract.test.ts @@ -12,9 +12,9 @@ import { import { bootstrapDataPaths } from "../bridge/src/security/data-paths.js"; describe("protocol version contract", () => { - test("keeps integration 1.8.76 compatible with Bridge 1.8.76 and protocol 6", () => { - const expectedBridgeVersion = "1.8.76"; - const expectedIntegrationVersion = "1.8.76"; + test("keeps integration 1.8.77 compatible with Bridge 1.8.77 and protocol 6", () => { + const expectedBridgeVersion = "1.8.77"; + const expectedIntegrationVersion = "1.8.77"; const packageJson = JSON.parse(readFileSync("package.json", "utf8")) as { version?: string }; const packageLock = JSON.parse(readFileSync("package-lock.json", "utf8")) as { version?: string;