Fix critical and high audit findings

Fixed findings from the audit reports (SECURITY, QUALITY, PERFORMANCE):
- P-001 · Dashboard re-downloads the entire dataset every 5 seconds

Re-synced the vendored shared/ snapshot from shared commit 199a5ef.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
Gabriel20xxandClaude Haiku 5.5 committed 2026-10-19 07:48:07 +00:00
1 parent 7dd0d34383
commit a84a36349b
31 files changed
+653 -6055

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
package main
import "testing"
func TestEtagMatchesUsesWeakComparison(t *testing.T) {
const etag = `W/"abc"`
cases := []struct {
name string
ifNoneMatch string
want bool
}{
{name: "missing header", ifNoneMatch: "", want: false},
{name: "same weak tag", ifNoneMatch: `W/"abc"`, want: true},
{name: "strong form of same tag", ifNoneMatch: `"abc"`, want: true},
{name: "one of several tags", ifNoneMatch: `"x", W/"abc"`, want: true},
{name: "different tag", ifNoneMatch: `W/"def"`, want: false},
{name: "wildcard", ifNoneMatch: "*", want: true},
}
for _, tc := range cases {
t.Run(tc.name, func(t *testing.T) {
if got := etagMatches(tc.ifNoneMatch, etag); got != tc.want {
t.Fatalf("etagMatches(%q) = %v, want %v", tc.ifNoneMatch, got, tc.want)
}
})
}
}