@@ -4,6 +4,193 @@ All notable changes to QR-SHIELD will be documented in this file.
44
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
66
7+ ## [ 1.19.5] - 2025-12-29
8+
9+ ### Raouf: Web App Offline-First & Judge-Proof Fixes (2025-12-29 AEDT)
10+
11+ ** Scope:** Make web app fully offline-capable and remove fake demo results
12+
13+ ** Issue 1: jsQR CDN Dependency (Offline Fail)**
14+ - ** Problem:** ` scanner.html ` loaded jsQR from jsdelivr CDN - offline demo would fail
15+ - ** Fix:** Downloaded jsQR.min.js (v1.4.0) locally to ` webApp/src/jsMain/resources/ `
16+ - ** File:** ` scanner.html ` line 375
17+
18+ ** Issue 2: js-joda Not Bundled for WASM (Reproducible Fix)**
19+ - ** Problem:** WASM loader uses bare ` import('@js-joda/core') ` which fails in browser without bundler
20+ - ** Fix:** Added webpack alias config ` js-joda-local.js ` that resolves @js-joda/core to node_modules copy
21+ - ** Result:** js-joda now bundled as ` vendors-node_modules_js-joda_core_dist_js-joda_esm_js.js ` (1MB)
22+ - ** File:** ` webApp/webpack.config.d/js-joda-local.js `
23+
24+ ** Issue 3: Judge Mode Used FAKE Results**
25+ - ** Problem:** ` forceMaliciousResult() ` returned hardcoded mock data, not real engine output
26+ - ** Problem:** ` populateDemoHistory() ` used hardcoded scores/verdicts
27+ - ** Fix:** Replaced with ` runGoldenSetDemo() ` that runs REAL engine on 6 deterministic URLs
28+ - ** Fix:** Changed ` populateDemoHistory() ` to call real ` qrshieldAnalyze() ` on each URL
29+
30+ | ID | File | Issue | Severity | Fix |
31+ | ----| ------| -------| ----------| -----|
32+ | 1 | ` scanner.html ` L375 | CDN jsQR dependency | ** HIGH** | Local jsQR.min.js |
33+ | 2 | ` webpack.config.d/js-joda-local.js ` | Bare @js-joda import | ** HIGH** | Webpack alias to node_modules |
34+ | 3 | ` app.js ` L1459-1474 | Fake forceMaliciousResult | ** HIGH** | Real engine Golden Set |
35+ | 4 | ` app.js ` L1540-1580 | Fake demo history | ** MED** | Real engine analysis |
36+
37+ ** Build Verification:**
38+ ``` bash
39+ ./gradlew :webApp:wasmJsBrowserDevelopmentWebpack
40+ # webpack compiled successfully ✅
41+ # js-joda bundled as vendors-*.js (1MB) ✅
42+
43+ ./gradlew :webApp:jsBrowserDevelopmentWebpack
44+ # webpack compiled successfully ✅
45+ ```
46+
47+ ** Offline Verification Checklist:**
48+ 1 . ` cd webApp/build/kotlin-webpack/js/developmentExecutable && python3 -m http.server 8080 `
49+ 2 . Open ` http://localhost:8080/ ` (need index.html or scanner.html)
50+ 3 . DevTools → Network → Offline
51+ 4 . Reload page - should still work
52+ 5 . ` typeof window.qrshieldAnalyze === 'function' ` should be true
53+
54+ ---
55+
56+ ## [ 1.19.4] - 2025-12-29
57+
58+ ### Raouf: Desktop App i18n Completeness Audit (2025-12-29 AEDT)
59+
60+ ** Scope:** Added missing translations to all 15 language files to ensure i18n completeness
61+
62+ ** Problem:** Language files had inconsistent translation counts (388-449 strings). Many critical UI strings were missing translations, causing fallback to English.
63+
64+ ** Baseline:** Portuguese (449 strings) used as reference as most complete file.
65+
66+ ** Fixes Applied:**
67+
68+ | Language | File | Missing | Added |
69+ | ----------| ------| ---------| -------|
70+ | Thai | ` DesktopStringsTh.kt ` | 51 | 51 |
71+ | Vietnamese | ` DesktopStringsVi.kt ` | 51 | 51 |
72+ | Turkish | ` DesktopStringsTr.kt ` | 51 | 51 |
73+ | Arabic | ` DesktopStringsAr.kt ` | 50 | 50 |
74+ | Korean | ` DesktopStringsKo.kt ` | 44 | 44 |
75+ | Hindi | ` DesktopStringsHi.kt ` | 83 | 83 |
76+ | German | ` DesktopStringsDe.kt ` | 74 | 74 |
77+ | Spanish | ` DesktopStringsEs.kt ` | 74 | 74 |
78+ | French | ` DesktopStringsFr.kt ` | 74 | 74 |
79+ | Indonesian | ` DesktopStringsIn.kt ` | 33 | 33 |
80+ | Japanese | ` DesktopStringsJa.kt ` | 41 | 41 |
81+ | Chinese | ` DesktopStringsZh.kt ` | 41 | 41 |
82+ | Italian | ` DesktopStringsIt.kt ` | 14 | 14 |
83+ | Russian | ` DesktopStringsRu.kt ` | 14 | 14 |
84+
85+ ** Key Missing Strings Fixed:**
86+ - Security explanations (sandbox, telemetry, offline analysis)
87+ - Report export labels and tips
88+ - Risk factor explanations (IDN homograph, redirect chains)
89+ - Training/onboarding strings
90+
91+ ** Build Verification:**
92+ ``` bash
93+ ./gradlew :desktopApp:compileKotlinDesktop
94+ # BUILD SUCCESSFUL ✅
95+ ```
96+
97+ ---
98+
99+ ## [ 1.19.3] - 2025-12-29
100+
101+ ### Raouf: Desktop App Security Hardening (2025-12-29 AEDT)
102+
103+ ** Scope:** Add file size validation and path traversal protection
104+
105+ ** Issue 1: Unbounded File Read (DoS Risk)**
106+ - ** Problem:** ` scanImageFile() ` called ` file.readBytes() ` without size validation
107+ - ** Risk:** User could drop a multi-GB file causing OOM crash
108+ - ** Fix:** Added 50MB max file size check before reading
109+
110+ ** Issue 2: Path Traversal in Export Filename**
111+ - ** Problem:** ` defaultExportFile() ` used user-controlled ` exportFilename ` directly
112+ - ** Risk:** Filename like ` ../../etc/passwd ` could write outside Downloads
113+ - ** Fix:** Sanitize filename - remove illegal chars, block ` .. ` , limit length to 200
114+
115+ | ID | File | Issue | Severity | Fix |
116+ | ----| ------| -------| ----------| -----|
117+ | 1 | ` AppViewModel.kt ` L274 | No file size limit | ** HIGH** | Added 50MB max check |
118+ | 2 | ` AppViewModel.kt ` L1110 | No path sanitization | ** MED** | Sanitize with regex, block traversal |
119+
120+ ** Build Verification:**
121+ ``` bash
122+ ./gradlew :desktopApp:compileKotlinDesktop
123+ # BUILD SUCCESSFUL ✅
124+ ```
125+
126+ ---
127+
128+ ## [ 1.19.2] - 2025-12-29
129+
130+ ### Raouf: Desktop App - Remove SampleData Leakage (2025-12-29 AEDT)
131+
132+ ** Scope:** Remove hardcoded SampleData.userProfile usage from production desktop screens
133+
134+ ** Non-Negotiable Rule:** Production screens must not use mock/sample/fixture data. User profile must come from persisted AppViewModel state.
135+
136+ ** Issue:** ` SampleData.userProfile ` was used in 4 files, causing UI to show hardcoded "Security Analyst" instead of user's actual profile.
137+
138+ ** Findings & Fixes:**
139+
140+ | ID | File | Issue | Severity | Fix |
141+ | ----| ------| -------| ----------| -----|
142+ | 1 | ` AppSidebar.kt ` L53,185,193,199 | Hardcoded profile in sidebar footer | ** HIGH** | Added userName/userRole/userInitials parameters |
143+ | 2 | ` ProfileDropdown.kt ` L54 | Dead code - SampleData unused | ** LOW** | Removed import and variable |
144+ | 3 | ` ScanHistoryScreen.kt ` L158 | Hardcoded profile in ImageAvatar | ** MED** | Added userName parameter with default |
145+ | 4 | ` ResultDangerousAltScreen.kt ` L107 | Dead code - SampleData unused | ** LOW** | Removed import and variable |
146+
147+ ** Call Sites Updated (12 total):**
148+ - DashboardScreen.kt, TrustCentreScreen.kt, ReportsExportScreen.kt
149+ - LiveScanScreen.kt, TrainingScreen.kt, TrustCentreAltScreen.kt
150+ - ResultDangerousAltScreen.kt, ResultDangerousScreen.kt
151+ - ResultSafeScreen.kt, ScanHistoryScreen.kt, ResultSuspiciousScreen.kt
152+
153+ ** Build Verification:**
154+ ``` bash
155+ ./gradlew :desktopApp:compileKotlinDesktop
156+ # BUILD SUCCESSFUL ✅
157+ ```
158+
159+ ---
160+
161+ ## [ 1.19.1] - 2025-12-29
162+
163+ ### Raouf: Critical Bug Fixes - Brand Detection & i18n Cleanup (2025-12-29 AEDT)
164+
165+ ** Scope:** Fix typosquatting detection for ` ggole%20.com ` and remove mixed-up i18n strings
166+
167+ ** Issue 1: Typosquatting URL Classified as SAFE**
168+ - ** Problem:** ` www.ggole%20.com ` (Google typosquat with URL-encoded space) was incorrectly classified as "Safe to Visit"
169+ - ** Root Cause:**
170+ 1 . BrandDatabase missing common transposition typosquats like "ggole", "googel", "goolge"
171+ 2 . BrandDetector.extractHost() not URL-decoding percent-encoded characters
172+
173+ ** Fixes Applied:**
174+ | File | Change |
175+ | ------| --------|
176+ | ` BrandDatabase.kt ` L131 | Added "ggole", "googel", "goolge" to Google typosquats list |
177+ | ` BrandDetector.kt ` L276-305 | Added ` decodePercentEncoding() ` to extractHost() to handle obfuscation |
178+
179+ ** Issue 2: Desktop App i18n Strings Mixed Up**
180+ - ** Problem:** German, Spanish, French, Portuguese, and Turkish language files contained Arabic/Hindi strings
181+ - ** Root Cause:** Copy-paste error during i18n expansion
182+
183+ ** Files Fixed:**
184+ | File | Removed |
185+ | ------| ---------|
186+ | ` DesktopStringsDe.kt ` | 82 Arabic/Hindi strings |
187+ | ` DesktopStringsEs.kt ` | 82 Arabic/Hindi strings |
188+ | ` DesktopStringsFr.kt ` | 82 Arabic/Hindi strings |
189+ | ` DesktopStringsPt.kt ` | 17 German/Hindi strings |
190+ | ` DesktopStringsTr.kt ` | 69 German/Hindi strings |
191+
192+ ---
193+
7194## [ 1.19.0] - 2025-12-29
8195
9196### Raouf: Final Security Audit - All Score Defaults Fixed (2025-12-29 AEDT)
0 commit comments