Skip to content

Commit 8858286

Browse files
committed
chore: bump to v0.5.1 with deep audit fixes
1 parent d96808f commit 8858286

5 files changed

Lines changed: 28 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,29 @@
22

33
All notable changes to ScriptHunt will be documented in this file.
44

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+
528
## [v0.5.0]
629

730
### Security

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ScriptHunt
22

3-
![Version](https://img.shields.io/badge/version-0.5.0-blue)
3+
![Version](https://img.shields.io/badge/version-0.5.1-blue)
44
![License](https://img.shields.io/badge/license-MIT-green)
55
![Platform](https://img.shields.io/badge/platform-Web-ff6600)
66
![JavaScript](https://img.shields.io/badge/JavaScript-ES2022-F7DF1E?logo=javascript&logoColor=black)

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@
373373
</div>
374374
<p class="tagline">Unified search across every userscript source</p>
375375
<div class="header-meta">
376-
<span class="version">v0.5.0</span>
376+
<span class="version">v0.5.1</span>
377377
<button class="theme-toggle" id="themeToggle" title="Switch theme" aria-label="Switch color theme">Auto</button>
378378
</div>
379379
</header>
@@ -516,7 +516,7 @@ <h3>Search userscripts everywhere</h3>
516516

517517
<script>
518518
/* =============================================
519-
ScriptHunt v0.5.0 - Unified Userscript Search
519+
ScriptHunt v0.5.1 - Unified Userscript Search
520520
Security Scanner + Trust Scoring + Comparison
521521
============================================= */
522522

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "scripthunt",
3-
"version": "0.5.0",
3+
"version": "0.5.1",
44
"private": true,
55
"scripts": {
66
"qa": "npm audit && npm test",

sw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var CACHE_NAME = 'scripthunt-v0.5.0';
1+
var CACHE_NAME = 'scripthunt-v0.5.1';
22
var SHELL_ASSETS = ['./', './index.html', './icon.png', './manifest.json'];
33

44
self.addEventListener('install', function(e) {

0 commit comments

Comments
 (0)