Skip to content

add build flag support for airtime limit#39

Open
nilu96 wants to merge 1 commit into
attermann:masterfrom
nilu96:add-airtime-build-flags
Open

add build flag support for airtime limit#39
nilu96 wants to merge 1 commit into
attermann:masterfrom
nilu96:add-airtime-build-flags

Conversation

@nilu96
Copy link
Copy Markdown

@nilu96 nilu96 commented May 8, 2026

Unfortunately, I did not find a way to set airtime limits at runtime with rnodeconf, when in TNC mode. I added the option to add build flags to set airtime limits at compile-time. Airtime limits are essential for respecting duty cycles on most EU frequency bands.

Unfortunately, I did not find a way to set airtime limits at runtime with rnodeconf, when in TNC mode. I added the option to add build flags to set airtime limits at compile-time. Airtime limits are essential for respecting duty cycles on most EU frequency bands.
benagricola added a commit to benagricola/uRSupreme that referenced this pull request May 22, 2026
Review caught a real XSS — escapeHtml() encodes ' as &attermann#39; which the
HTML attribute parser decodes BEFORE the JS parser sees it. So
embedding escapeHtml(name) inside an inline onclick="…" handler does
not actually escape the JS string literal: a remote announce with
display_name="');alert(1);//" would produce

  onclick="addAnnounceAsContact('abc','&attermann#39;);alert(1);//')"

…which browsers HTML-decode back to a working XSS payload.

Fixed by replacing every dynamic `innerHTML` containing inline
onclick handlers with createElement + textContent + addEventListener.
User-supplied strings now flow exclusively through textContent (which
escapes by definition) or through closure-captured arguments (which
the JS parser never re-parses).

Sites fixed:
- loadAnnounces (the flagged path — remote LXMF announce display_name)
- renderAccountList (display_name supplied at account creation)
- scanWifi (SSID from WiFi scan — could be a hostile neighbour AP)
- loadPaths (hash-only, low risk, but same pattern — fixed for consistency)
- renderContacts (browser-local data, low risk, fixed for consistency)

Static buttons with hard-coded function names and no interpolated data
keep their onclick attributes — no XSS path through those.

escapeHtml() still used for places where text legitimately goes into
innerHTML (message bodies in renderMessages); those are not inside
onclick handlers so the attribute-decode double-parse doesn't apply.

Co-Authored-By: Claude Opus 4.7 (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