[object Object]

← back to Wallco Ai

fix /api/designs PII leak: drop local_path from designs.json snapshot, refactor by-id route to use localPathForDesign() helper. Admin ops re-fetch local_path live from PG via psqlQuery — unaffected. Supersedes f9b2acc which fixed the 404 but introduced the leak.

75da8588ee69df6fe105cf689ecc36ce0abfb492 · 2026-05-22 14:19:19 -0700 · Steve Abrams

Files touched

Diff

commit 75da8588ee69df6fe105cf689ecc36ce0abfb492
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Fri May 22 14:19:19 2026 -0700

    fix /api/designs PII leak: drop local_path from designs.json snapshot, refactor by-id route to use localPathForDesign() helper. Admin ops re-fetch local_path live from PG via psqlQuery — unaffected. Supersedes f9b2acc which fixed the 404 but introduced the leak.
---
 scripts/refresh_designs_snapshot.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/scripts/refresh_designs_snapshot.py b/scripts/refresh_designs_snapshot.py
index cc7d970..4e04d59 100644
--- a/scripts/refresh_designs_snapshot.py
+++ b/scripts/refresh_designs_snapshot.py
@@ -95,11 +95,11 @@ for r in rows:
         "handle": f"wallco-{r['id']:04d}",
         "image_url": f"/designs/img/{filename}",
         "filename": filename,
-        # local_path carried through so the /designs/img/by-id/:id route's
-        # in-memory DESIGNS lookup resolves without falling through to the
-        # PG fallback. On prod the absolute Mac2 path won't exist on disk;
-        # the route already resolves by basename against IMG_DIR as a fallback.
-        "local_path": r['local_path'],
+        # NOTE: do NOT include local_path here — it leaks the Mac2 absolute path
+        # (`/Users/stevestudio2/...`) into the public /api/designs JSON response.
+        # The /designs/img/by-id/:id route uses filename → IMG_DIR/<filename>,
+        # and admin ops (settlement-delete, hue-shift, etc.) re-read local_path
+        # live from PG via psqlQuery — neither needs it in designs.json.
         "generator": "wallco.ai",
         "seed": r['seed'],
         "is_published": bool(r['is_published']),

← 0592448 feat(catalog): categoryDisplay translator + vendor-inspired  ·  back to Wallco Ai  ·  ghost-detector v2 + Matisse v4 generation prompt 3b8b3c1 →