Skip to content

Dexcom credential UX improvements and JSON injection fix#154

Open
miqcie wants to merge 1 commit intoktomy:mainfrom
miqcie:upstream/dexcom-ux-xss
Open

Dexcom credential UX improvements and JSON injection fix#154
miqcie wants to merge 1 commit intoktomy:mainfrom
miqcie:upstream/dexcom-ux-xss

Conversation

@miqcie
Copy link
Copy Markdown

@miqcie miqcie commented Apr 1, 2026

Follow-up to #143 (closed per request for focused PRs). Two changes: Dexcom credential UX improvements and a small security hardening fix.

Dexcom credential UX (data/index.html)

  • Add autocomplete=username and autocomplete=current-password so password managers can autofill
  • Add placeholder text and helper text clarifying these are your Dexcom app credentials

JSON injection hardening (src/ServerManager.cpp)

  • Add jsonStringEscape() helper for safe string embedding in concatenated JSON
  • Apply to bgSource and bgSourceStatus in /api/status endpoint
  • Defensive: current values are hardcoded, but prevents future injection risk

No captive portal, weather face, zip geocoding, or deferred restart included.

Builds clean: pio run -e ulanzi (71% flash, 17.6% RAM).

UX: Add autocomplete attributes (username/current-password) and
placeholder hints to Dexcom login fields so password managers can
autofill. Add helper text clarifying these are the same credentials
used in the Dexcom mobile app.

Security: Add jsonStringEscape() helper and apply it to string values
in the /api/status JSON response built by concatenation, preventing
potential injection via crafted status strings.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant