add build flag support for airtime limit#39
Open
nilu96 wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.