|
2 | 2 |
|
3 | 3 | All notable changes to ScriptHunt will be documented in this file. |
4 | 4 |
|
| 5 | +## [v0.5.1] |
| 6 | + |
| 7 | +### Security |
| 8 | +- Fixed CORS proxy origin confusion — `startsWith('http://localhost')` now requires exact origin match, preventing subdomain impersonation (e.g. `http://localhost.evil.com`). Regression test added. |
| 9 | +- Hardened CSP meta tag construction — proxy URLs with semicolons, single-quotes, or commas in the pathname are now rejected before CSP injection. |
| 10 | +- Custom source URLs from untrusted API responses are now sanitized through `safeUrl()` before rendering. |
| 11 | +- Script scan fetch now rejects responses larger than 5 MB to prevent memory exhaustion from malicious install URLs. |
| 12 | + |
| 13 | +### Fixed |
| 14 | +- Search race condition: overlapping searches from rapid typing now abort stale in-flight requests instead of concatenating results from different queries. |
| 15 | +- Spam detection no longer false-positives high-install scripts from sources that don't report ratings (GitHub, OpenUserJS, ScriptCat, Gists). |
| 16 | +- `hashString` FNV-1a implementation now uses `Math.imul` for correct 32-bit arithmetic, preventing cross-engine hash inconsistencies. |
| 17 | +- `installedState()` per-card localStorage parse replaced with cached reads — ~100x fewer JSON.parse calls during result rendering. |
| 18 | +- `setFavs`, `setInstalledScripts`, `setSavedSearches`, and `lsWriteOfflineEntries` now wrapped in try/catch with user-facing toast for localStorage quota errors. |
| 19 | +- Broken `og:image` meta tag pointed to nonexistent `banner.png` — now points to `icon.png`. |
| 20 | +- OLED theme result card border now uses `var(--border)` instead of hardcoded `#222`. |
| 21 | +- Removed dead CSS media query `@media (prefers-color-scheme: light) { html.theme-auto { } }`. |
| 22 | +- Removed dead `canScan` variable — always `true`, all conditional branches were unreachable. |
| 23 | +- Custom source IDs now use deterministic hashes instead of `Math.random()`, fixing cross-session deduplication. |
| 24 | +- Added `.trust-dim-score` CSS styling (monospace, proper color). |
| 25 | +- Modal title uses `<h2>` instead of `<div>` for proper heading hierarchy. |
| 26 | +- Stats bar text (`id="statsText"`) now has `aria-live="polite"` so screen readers announce result counts. |
| 27 | + |
5 | 28 | ## [v0.5.0] |
6 | 29 |
|
7 | 30 | ### Security |
|
0 commit comments