Skip to content

security/netbird: say what the buttons that drop the tunnel do - #5669

Open
BxnnyG wants to merge 3 commits into
opnsense:masterfrom
BxnnyG:netbird/pr-button-warnings
Open

security/netbird: say what the buttons that drop the tunnel do#5669
BxnnyG wants to merge 3 commits into
opnsense:masterfrom
BxnnyG:netbird/pr-button-warnings

Conversation

@BxnnyG

@BxnnyG BxnnyG commented Aug 25, 2026

Copy link
Copy Markdown

Important notices

If AI was used, please disclose:

  • Model used: Claude Opus 5, via Claude Code
  • Extent of AI involvement: the code, the commit messages and this description were written by the model working under my direction. Every change was reviewed by me and verified on my own production OPNsense 26.7 router before submission. Note that the commits on this branch are missing the Co-Authored-By trailer that my other pull requests carry — an oversight on my part rather than a distinction; I have left them alone rather than force-push over an open pull request, but will rewrite them if you would prefer that.

I did not open an issue first and should have — I am happy to do that now, or to split anything here that is too large to review as a single change. Apologies for submitting without this template filled in; that was my mistake, not a deliberate omission.


Two buttons in this plugin take the tunnel down, and neither says so.

The plugin is typically installed on a router, which means the admin using it may well be reaching that router through NetBird. Both of these are then a way to cut the connection you are sitting on, with no undo from the far side.

Apply, on the Settings page. ApiMutableServiceControllerBase::reconfigureAction() runs netbird stop, regenerates /etc/rc.conf.d/netbird and runs netbird startreconfigureForceRestart() returns 1 by default and this plugin does not override it. The tunnel drops and re-establishes. The page showed the stock "After changing settings, please remember to apply them."

This uses data_change_message_content, the slot the apply partial already provides, the same way seven other plugin views in this repository explain what their Apply does.

Disconnect, on the Authentication page. One click ran netbird down with no confirmation. Apply at least requires an unsaved change first; this required nothing.

SimpleActionButton has no confirm option, but it only calls the endpoint once onPreAction's deferred resolves, so a dialog that rejects on every exit except the confirm button is the intended shape. Closing by backdrop or escape counts as saying no.

Also in here: three status strings on the Authentication page ("Enable NetBird first", "NetBird is connected", "NetBird is not connected") were plain JavaScript literals and stayed English regardless of the GUI language. They go through lang._() now.

No behaviour changes beyond the one confirmation dialog. No model, endpoint or configd changes.

Tested on an OPNsense 26.7 router running NetBird 0.74.4 against a self-hosted management server: the Apply warning renders and is accurate (the tunnel drops and returns); the Disconnect dialog confirms, cancels cleanly without calling the endpoint, and treats dismissal as cancel; the tunnel and LAN routing are unaffected.

Benny added 3 commits August 25, 2026 17:08
…nnel

The settings page showed the stock "remember to apply them" message. Apply
then stops the netbird service, rewrites /etc/rc.conf.d/netbird and starts it
again - reconfigureForceRestart() defaults to 1 and this plugin does not
override it - so the tunnel drops. For an admin who reaches this firewall
through NetBird, that is the connection they are using, and nothing said so
beforehand.

Use the message slot the apply partial already provides for this. Seven views
in this repository do the same.
The Disconnect button ran netbird down on a single click, with no
confirmation. An admin reaching this firewall through NetBird is on the
connection that button severs, and there is no undo from the far side. Apply at
least needs an unsaved change first; this needed nothing.

SimpleActionButton has no confirm option, but it runs the endpoint only when
onPreAction's deferred resolves, so a dialog that rejects on every exit except
the confirm button is the intended shape. Closing by backdrop or escape counts
as saying no.

The three status messages on this page were plain JavaScript literals and
stayed English whatever the GUI language was set to; they go through lang._()
now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant