security/netbird: say what the buttons that drop the tunnel do - #5669
Open
BxnnyG wants to merge 3 commits into
Open
security/netbird: say what the buttons that drop the tunnel do#5669BxnnyG wants to merge 3 commits into
BxnnyG wants to merge 3 commits into
Conversation
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.
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.
Important notices
If AI was used, please disclose:
Co-Authored-Bytrailer 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()runsnetbird stop, regenerates/etc/rc.conf.d/netbirdand runsnetbird start—reconfigureForceRestart()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 downwith no confirmation. Apply at least requires an unsaved change first; this required nothing.SimpleActionButtonhas no confirm option, but it only calls the endpoint onceonPreAction'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 throughlang._()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.