From a336746d00da13cbb47aaf873ea3ba3a596f9fc7 Mon Sep 17 00:00:00 2001 From: Bruno Charest Date: Fri, 20 Nov 2026 07:42:55 -0500 Subject: [PATCH] =?UTF-8?q?fix:=20CI=20=E2=80=94=20i18n=20importable=20en?= =?UTF-8?q?=20Node=20+=20mistune=20>=3D3.3.4=20(BUG-128,=20BUG-129)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BUG-129 : les exports globaux de i18n.js sont protégés par typeof window pour que desktop-roots.test.mjs (Node sans JSDOM) ne casse plus. BUG-128 : mistune 3.3.3 -> >=3.3.4 (CVE-2026-97698/97699), plancher ajouté au garde-fou pip-audit. --- CHANGELOG.md | 11 ++++++++++- README.fr.md | 6 +++--- README.md | 6 +++--- VERSION | 2 +- backend/requirements.txt | 2 +- desktop/Cargo.lock | 2 +- desktop/Cargo.toml | 2 +- desktop/tauri.conf.json | 2 +- docs/ISSUES_TODOLIST.md | 1 + docs/ROADMAP.md | 2 +- frontend/js/i18n.js | 15 ++++++++++----- package.json | 2 +- tests/test_ci_workflow.py | 3 +++ 13 files changed, 37 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 847f765..15a5424 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ Format basé sur [Keep a Changelog](https://keepachangelog.com/fr/1.1.0/), et [Semantic Versioning](https://semver.org/spec/v2.0.0.html). > **En cours de développement** : les changements à venir sont listés dans la section -> [Unreleased](#unreleased). La dernière version livrée est **2.88.0**. +> [Unreleased](#unreleased). La dernière version livrée est **2.88.1**. --- @@ -14,6 +14,15 @@ et [Semantic Versioning](https://semver.org/spec/v2.0.0.html). --- +## [2.88.1] — 2026-11-20 + +### Corrigé + +- **CI lint — `i18n.js` importable en Node** : le module écrivait `window.t/tr/...` au chargement. Depuis que `desktop.js` importe `i18n.js`, le test `node tests/frontend/desktop-roots.test.mjs` (sans JSDOM) échouait sur `ReferenceError: window is not defined`. Les exports globaux sont désormais protégés par `typeof window !== "undefined"` — aucun changement navigateur. +- **Sécurité — `mistune` 3.3.3 → `>=3.3.4`** : `pip-audit` (job `security` bloquant) signale CVE-2026-97698 et CVE-2026-97699, corrigées en 3.3.4. Plancher ajouté au garde-fou `TestDependencySecurityFloors` + requirements ; le runtime desktop embarqué est reconstruit avec la version corrigée. + +--- + ## [2.88.0] — 2026-11-20 ### Ajouté diff --git a/README.fr.md b/README.fr.md index 8e0593d..27bae5b 100644 --- a/README.fr.md +++ b/README.fr.md @@ -4,7 +4,7 @@ **Porte d'entrée web ultra-léger pour vos vaults Obsidian** — Accédez, naviguez et recherchez dans toutes vos notes Obsidian depuis n'importe quel appareil via une interface web moderne et responsive. -[![Version](https://img.shields.io/badge/Version-2.88.0-blue.svg)]() +[![Version](https://img.shields.io/badge/Version-2.88.1-blue.svg)]() [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Docker](https://img.shields.io/badge/Docker-Ready-blue.svg)](https://www.docker.com/) [![Python](https://img.shields.io/badge/Python-3.11+-green.svg)](https://www.python.org/) @@ -981,8 +981,8 @@ Ce projet est sous licence **MIT** — voir le fichier [LICENSE](LICENSE) pour l ## 📝 Changelog -Consultez le [CHANGELOG.md](./CHANGELOG.md) pour l'historique complet de toutes les versions (v1.0.0 → v2.88.0). +Consultez le [CHANGELOG.md](./CHANGELOG.md) pour l'historique complet de toutes les versions (v1.0.0 → v2.88.1). --- -*Projet : ObsiGate | Version : 2.88.0 | Dernière mise à jour : Septembre 2026* +*Projet : ObsiGate | Version : 2.88.1 | Dernière mise à jour : Septembre 2026* diff --git a/README.md b/README.md index 04521b1..8ff627b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ **Ultra-light web gateway for your Obsidian vaults** — Access, browse, and search all your Obsidian notes from any device via a modern, responsive web interface. -[![Version](https://img.shields.io/badge/Version-2.88.0-blue.svg)]() +[![Version](https://img.shields.io/badge/Version-2.88.1-blue.svg)]() [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Docker](https://img.shields.io/badge/Docker-Ready-blue.svg)](https://www.docker.com/) [![Python](https://img.shields.io/badge/Python-3.11+-green.svg)](https://www.python.org/) @@ -1156,8 +1156,8 @@ This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) ## 📝 Changelog -See [CHANGELOG.md](./CHANGELOG.md) for the complete version history (v1.0.0 → v2.88.0). +See [CHANGELOG.md](./CHANGELOG.md) for the complete version history (v1.0.0 → v2.88.1). --- -*Project: ObsiGate | Version: 2.88.0 | Last updated: September 2026* +*Project: ObsiGate | Version: 2.88.1 | Last updated: September 2026* diff --git a/VERSION b/VERSION index 093fd27..2703e3f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.88.0 +2.88.1 diff --git a/backend/requirements.txt b/backend/requirements.txt index 98be835..6986e5f 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -2,7 +2,7 @@ fastapi==0.141.1 uvicorn==0.54.0 websockets>=12.0 python-frontmatter==1.1.0 -mistune==3.3.3 +mistune>=3.3.4 python-multipart==0.0.31 aiofiles==23.2.1 # Plancher de sécurité : 3.14.3 est vulnérable à 8 CVE (dont diff --git a/desktop/Cargo.lock b/desktop/Cargo.lock index d0c684a..183f112 100644 --- a/desktop/Cargo.lock +++ b/desktop/Cargo.lock @@ -2626,7 +2626,7 @@ dependencies = [ [[package]] name = "obsigate-desktop" -version = "2.88.0" +version = "2.88.1" dependencies = [ "chrono", "env_logger", diff --git a/desktop/Cargo.toml b/desktop/Cargo.toml index ba5c0af..b83278d 100644 --- a/desktop/Cargo.toml +++ b/desktop/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "obsigate-desktop" -version = "2.88.0" +version = "2.88.1" description = "ObsiGate Desktop — Porte d'entrée native pour vos vaults Obsidian" authors = ["Bruno Charest"] edition = "2021" diff --git a/desktop/tauri.conf.json b/desktop/tauri.conf.json index f3d3a0a..3f08397 100644 --- a/desktop/tauri.conf.json +++ b/desktop/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/nicedoc/obsigate/main/desktop/tauri.conf.schema.json", "productName": "ObsiGate", - "version": "2.88.0", + "version": "2.88.1", "identifier": "com.obsigate.desktop", "build": { "frontendDist": "../frontend", diff --git a/docs/ISSUES_TODOLIST.md b/docs/ISSUES_TODOLIST.md index 7249cee..bc55288 100644 --- a/docs/ISSUES_TODOLIST.md +++ b/docs/ISSUES_TODOLIST.md @@ -370,6 +370,7 @@ Avant de corriger quoi que ce soit, un agent IA doit : | 2026-11-08 | BUG-125 (suite entrée SSO) | Correction | `frontend/js/auth.js`, `tests/test_draco_barre.py`, `CHANGELOG.md`, `docs/ISSUES_TODOLIST.md`, `docs/ROADMAP.md`, `docs/features/retour-sso-cookie-draco-bug-125.md`, `VERSION` (+ dérivés) | **BUG-125 — retour SSO honoré mais pont sans cookie draco** : quand les cookies `access_token` et `draco_session` ont disparu alors que `sessionStorage` croit la session valide, le chemin court d'`initAuth()` repartait sans échange serveur — aucune réémission du cookie draco — et le pont de l'application sœur, sans jeton, déposait l'utilisateur devant son formulaire nu. Correctif : avec `return_to`, `initAuth()` force le refresh silencieux + `/api/auth/me` (réémission par `DracoRenewalMiddleware`) avant d'honorer le retour. Reproduit puis vérifié en navigateur réel dans la pile « conteneur dev réel » (requête du pont journalisée : sans cookie avant, avec cookie après) | 🟢 corrigé (en attente vérif utilisateur) | | 2026-11-19 | BUG-126 | Correction build desktop Windows | `desktop/build-windows.bat`, `desktop/build-linux.sh`, `tests/test_desktop_build_scripts.py`, `README.md`, `README.fr.md`, `desktop/README.md`, `docs/DEVELOPMENT_AND_RELEASES.md`, `docs/GUIDES/DESKTOP.md`, `CHANGELOG.md`, `docs/ISSUES_TODOLIST.md` | **BUG-126 — l'exe Windows s'ouvrait comme « sans CSS » et le build demandait deux fois un mot de passe.** Cause racine : `desktop\python-embed\python311._pth` ne contenait plus que `import site` + `..` (ni `python311.zip` ni `.`) → `ModuleNotFoundError: No module named 'encodings'`, backend mort avant le health check, fenêtre bloquée sur le HTML embarqué Tauri dont `/static/*` ne résout pas (d'où l'apparence non stylée). Reproduction : `python-embed\python.exe -c "import encodings"` échoue ; après réécriture explicite du `_pth`, le backend servi par le runtime release répond `/api/health` 200 et `/static/style.css` 200 (`text/css`, 363 860 octets). Correctif : `_pth` écrit explicitement (`python311.zip`, `.`, `import site`, `..`), contrôles d'échec sur download/extraction/get-pip/pip + sanity `import encodings, uvicorn, fastapi, pyotp`, copie du runtime complet (`python-embed`, `backend`, `frontend`) à côté de l'exe, exécution depuis `%~dp0`, arrêt limité au python embarqué. Invite de mot de passe : la clé updater n'est utilisée que si `TAURI_SIGNING_PRIVATE_KEY_PASSWORD` est défini, sinon `createUpdaterArtifacts:false` + `--ci` (aucune invite, build sans `.sig`). | 🟢 corrigé (en attente vérif utilisateur) | | 2026-11-19 | #230 + BUG-127 | Fonctionnalité desktop + correction | `desktop/src/main.rs`, `desktop/permissions/commands.toml`, `backend/routers/desktop_sso.py`, `backend/main.py`, `frontend/js/{auth,desktop,config}.js`, `frontend/index.html`, `frontend/style.css`, `frontend/locales/{fr,en}.json`, `tests/test_desktop_sso.py`, `tests/test_desktop_sso_ui.py`, `tests/frontend/desktop.test.mjs`, `tests/test_draco_barre.py`, `docs/features/desktop-sso-environnement-230.md`, `docs/ROADMAP.md`, `CHANGELOG.md`, `docs/ISSUES_TODOLIST.md` | **#230 — l'app desktop peut se connecter avec le compte central et choisir prod/dev.** Constat : le backend desktop sert `127.0.0.1`, le cookie `draco_session` (`Domain=.dracodev.net`) ne lui parvient jamais ; le premier lancement générait un mot de passe admin aléatoire visible seulement dans les logs. Livré : liaison d'appareil sur le central choisi (`/api/v1/liaison`), validation du jeton draco via `/api/auth/me` du central, ouverture de la session de l'admin local par défaut ; login local conservé (admin/chab30 à la création). Sélecteur d'environnement en Configuration + premier lancement, injecté au backend embarqué (`OBSIGATE_DESKTOP*`, `DRACO_AGENT_URL`, `DRACO_OBSIGATE_URL` ; sœurs/Hub `-dev` dérivés). Routes `/api/desktop/sso/*` = 404 hors desktop, UI conditionnée par `isTauriEnv()` : application web Docker inchangée. **BUG-127** : `/liaison` même hôte honoré après login (`return_to`), sinon l'approbation desktop restait bloquée. Vérifié : `test_desktop_sso.py` 9 passed, 32 tests Rust (ACL incluse), `desktop.test.mjs` 30, `test_draco_barre`/`test_desktop_sso_ui`/i18n parity verts. | 🟢 corrigé/livré (en attente vérif utilisateur) | +| 2026-11-20 | BUG-128 + BUG-129 | Correction CI | `backend/requirements.txt`, `tests/test_ci_workflow.py`, `frontend/js/i18n.js`, `CHANGELOG.md`, `docs/ISSUES_TODOLIST.md` | **BUG-128 — `security` rouge : `pip-audit` signale mistune 3.3.3 (CVE-2026-97698/97699, fix 3.3.4)**. Plancher porté à `mistune>=3.3.4`, ajouté à `TestDependencySecurityFloors` ; runtime desktop reconstruit. **BUG-129 — `lint` rouge : `desktop-roots.test.mjs` importe `desktop.js` → `i18n.js`, qui écrivait `window.t/...` au chargement en Node** (`ReferenceError: window is not defined`). Exports globaux protégés par `typeof window !== "undefined"`. Vérifié : `node tests/frontend/desktop-roots.test.mjs` 4/4, suite pytest complète avec mistune 3.4.0, ruff/mypy 0. | 🟢 corrigé (en attente vérif utilisateur) | --- diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index 27c8afb..aec538b 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -1,6 +1,6 @@ # ObsiGate — Roadmap -> **Version :** 2.88.0 | **Dernière mise à jour :** 2026-11-20 +> **Version :** 2.88.1 | **Dernière mise à jour :** 2026-11-20 > **Ce fichier ne contient que le travail à venir** (🔵 En cours + ⚪ Backlog) et un index compact > vers les fonctionnalités livrées. > - **Méthode de livraison à appliquer pour toute tâche : [DELIVERY_WORKFLOW.md](./DELIVERY_WORKFLOW.md)** diff --git a/frontend/js/i18n.js b/frontend/js/i18n.js index f9ce90e..0d53530 100644 --- a/frontend/js/i18n.js +++ b/frontend/js/i18n.js @@ -158,11 +158,16 @@ async function _loadLocaleStrings(locale) { } // ── Global exports for non-module scripts (legacy app.js) ────────────────── -window.t = t; -window.tr = tr; -window.getLocale = getLocale; -window.setLocale = setLocale; -window.initI18n = initI18n; +// Guarded so the module can also be imported in Node (JSDOM-less unit tests) +// without a browser global: desktop.js/auth.js import i18n.js and must stay +// loadable in `node tests/frontend/desktop-roots.test.mjs`. +if (typeof window !== "undefined") { + window.t = t; + window.tr = tr; + window.getLocale = getLocale; + window.setLocale = setLocale; + window.initI18n = initI18n; +} /** Walk the DOM and update every element with a data-i18n* attribute. */ function _applyDOM() { diff --git a/package.json b/package.json index f06ed3b..20ac53a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsigate", - "version": "2.88.0", + "version": "2.88.1", "description": "**Porte d'entrée web ultra-léger pour vos vaults Obsidian** — Accédez, naviguez et recherchez dans toutes vos notes Obsidian depuis n'importe quel appareil via une interface web moderne et responsive.", "main": "patch.js", "directories": { diff --git a/tests/test_ci_workflow.py b/tests/test_ci_workflow.py index 0db1a27..cd339f3 100644 --- a/tests/test_ci_workflow.py +++ b/tests/test_ci_workflow.py @@ -262,6 +262,9 @@ class TestDependencySecurityFloors: "brotli": (1, 2, 1), # PYSEC-2026-4322, GHSA-9v8h-qqgm-4m35 (fix 1.2.1) "filelock": (4, 2, 1), # CVE-2026-112940, CVE-2026-112913, CVE-2026-112907 (fix 4.2.1) "opentelemetry-api": (1, 45, 1), # CVE-2026-114603 (fix 1.45.1) + # CI security 2026-11-20 : mistune 3.3.3 frappée par deux CVE, + # corrigées en 3.3.4 (pip-audit bloquant). + "mistune": (3, 3, 4), # CVE-2026-97698, CVE-2026-97699 (fix 3.3.4) } def test_security_floors_are_declared(self):