Files
LEDMatrix/assets
ChuckBuildsandClaude Opus 5 d2379a1eb6 fix(web): stop /config/secrets handing out every credential it holds
GET /api/v3/config/secrets returned config_secrets.json in full to anyone who
could reach the port, and this interface has no authentication. Probed against
a real rig it produced six populated credential fields: a 40-character GitHub
token, a 183-character Home Assistant token, and Jellyfin and weather API keys.
This is the second door onto the same credentials; #477 closes the first.

Masking the response alone would have been worse than the leak. The only
client fetches every secret, edits one field and posts all of them back, and
save_raw_file_content replaces the file wholesale -- so a masked GET followed
by the client's own save would write the mask over every credential the user
had not touched. That is why this was left open when the leak was found; it
needs both halves.

Read side: mask_all_secret_values(), which already existed for exactly this
endpoint -- its docstring names it -- and had never been wired to a call site.
It leaves empty values and YOUR_* placeholders alone, so a client can still
tell "set" from "not set" without being told the secret.

Write side: strip the echoed mask and blanks from the submission, then merge
onto what is stored, so "unchanged" means unchanged. The cost is that a secret
can no longer be cleared by blanking it; that wants its own affordance, since
a control that erases credentials as a side effect of saving an unrelated one
is not one.

Browser side: the token field is now left empty rather than filled from the
response. Filling it with the mask would have stored eight bullet characters
as the token the next time the user pressed Save, and filling it with the real
value is the thing being fixed. It reports whether a token is saved instead.

Verified end to end through the Flask endpoints, not the helpers. Reverting
the masking fails the leak tests; reverting the merge fails the preservation
tests; both halves are independently guarded. 278 web tests pass.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01STMbQE4YctTacQXfbYqKuW
2026-08-20 12:13:12 -04:00
..
2025-09-10 18:21:03 -04:00
2025-12-09 10:59:18 -05:00
2025-04-18 18:56:16 -05:00
2025-04-21 21:38:32 -05:00

assets/

Static assets bundled with LEDMatrix. Do not delete these directories — several look unused from core code alone but are resolved at runtime by installed store plugins.

Directory Used by
fonts/ Core (FontManager, DisplayManager) and most plugins
sports/ Core logo tooling (src/logo_downloader.py) and the sports scoreboard plugins; team logos are downloaded here on demand
stocks/ ledmatrix-stocks plugin (crypto_icons/, ticker_icons/)
weather/ ledmatrix-weather plugin (weather icons)
news_logos/ news plugin
broadcast_logos/ news and odds-ticker plugins
static_images/ Legacy examples referenced in the static-image plugin's docs; the plugin itself stores uploads under assets/plugins/<plugin-id>/uploads/
plugins/ Per-plugin uploaded files (assets/plugins/<plugin-id>/uploads/), served by the web interface

Plugins resolve these paths relative to the LEDMatrix install directory, so the directories are part of the de-facto plugin API even where no file in this repo references them. New plugins should bundle their own assets or use the per-plugin upload directory instead of adding top-level directories here.