Garden store Go web app
  • Go 34.1%
  • JavaScript 30.7%
  • Go Template 29.7%
  • PLpgSQL 5.4%
Find a file
AScully24 21541da27e fix: security, performance and correctness hardening pre-launch
Security:
- XSS: HTML-escape name/slug in categoryRowHTML; JSON-encode JS args
- Auth: use crypto/subtle.ConstantTimeCompare for admin token checks
- Config: fatal at startup if STRIPE_SECRET_KEY set without STRIPE_WEBHOOK_SECRET
- Checkout: look up all prices server-side; client-supplied prices ignored
- Redirect: parse Referer to path-only; validate ?next= is relative in auth middleware and login handler
- Logout: restrict to POST only (removes GET logout CSRF vector)

Performance:
- Sync: use CheckStock instead of GetDetail — avoids downloading full product data on every sync cycle
- Migration 011: add 12 indexes on products, product_tags, product_images, orders, order_items

Correctness:
- Stripe: use math.Round for pence conversion (fixes float truncation)
- supplierLabel: add 'marshalls' → 'Marshalls Garden' case
- AI fill: add 90s context timeout; remove dead exitErr stub
- Email: log send failures instead of silently discarding errors
- Remove dead sendOrderFulfilledEmail function
- admin_settings: remove hardcoded LAN IP fallback

Deps/housekeeping:
- go.mod: correct version 1.26.2 → 1.23.2
- Upgrade x/crypto 2019 build → v0.52.0 and all x/ siblings
- go mod tidy: stripe-go now correctly marked direct
- Add public/robots.txt disallowing /admin/ and /api/
2026-05-27 10:09:37 +00:00
cmd fix: security, performance and correctness hardening pre-launch 2026-05-27 10:09:37 +00:00
internal fix: security, performance and correctness hardening pre-launch 2026-05-27 10:09:37 +00:00
migrations fix: security, performance and correctness hardening pre-launch 2026-05-27 10:09:37 +00:00
public fix: security, performance and correctness hardening pre-launch 2026-05-27 10:09:37 +00:00
templates feat(products): add variant_type field for size/quantity/colour/pack 2026-05-26 11:34:17 +00:00
.env.example Strip Keycloak/OPA, fix .env.example for garden-store scaffold 2026-05-11 15:59:26 +00:00
.gitignore Initial commit 2026-04-27 14:48:20 +00:00
agent-admin-api.md feat: add JSON request body support to admin import/settings/category handlers 2026-05-18 12:34:57 +00:00
AGENTS.md docs: update AGENTS.md — Marshalls, new routes, hydrate note, partials 2026-05-20 17:50:47 +00:00
garden-store.service feat: systemd service unit and deploy steps (US-016) 2026-05-11 20:11:40 +00:00
go.mod fix: security, performance and correctness hardening pre-launch 2026-05-27 10:09:37 +00:00
go.sum fix: security, performance and correctness hardening pre-launch 2026-05-27 10:09:37 +00:00
Makefile Initial commit 2026-04-27 14:48:20 +00:00
UX-PLAN.md feat: UX phase 2 — sort, quick-add, flyout, autocomplete, sticky ATC, lightbox 2026-05-21 11:08:40 +00:00