Repository navigation
network: fix VPN retry while a browser login is still waiting - #4464
Merged
Merged
Conversation
A Fortinet SAML or GlobalProtect login waited up to five minutes for the browser while nothing tracked it: a retry started a second login that could not bind the redirect port, and the Control Center row went idle after 30 seconds with no way to cancel. Browser logins from ConnectVPN and from the secret agent now share one slot in the backend. Any new connect cancels the waiting login and waits until it has closed its listener or ended gp-saml-gui (now run in its own process group). Disconnect, disconnect all and deleting the profile cancel it too, and NetworkManager's CancelGetSecrets ends a login the agent started. A cancelled connect answers success:false instead of an error, so no cancel shows a toast. The network state carries vpnBrowserLoginUuid while a login waits. The shell keeps that row on Connecting..., ends its busy state so other VPNs stay usable, and turns a click on the row into a cancel when the backend can act on it. Settings -> Network -> Connections now starts VPN and WireGuard rows through the same connect path; before, those activations got no secrets and failed silently. Credential prompts that end without an answer from the shell (timeout, CancelGetSecrets, a cancelled or replaced login) are announced on a new network.credentials.closed event, and the shell closes the matching prompt. API version 46. The icon slot in SettingsRow is now sized on the Loader, since a Loader keeps its last item's width after unloading; connecting rows in the Control Center no longer shift their text. Fixes duxlabs-dev#4366
Contributor
Claude reviewNo issues found. |
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.
Description
A VPN that logs in through the browser (Fortinet SAML or GlobalProtect) kept waiting for that login for 5 minutes, while the row stopped showing Connecting... after 30 seconds. A retry then failed because the first login still held the redirect port but there was no way to cancel it anymore.
Now connecting any VPN replaces the waiting login, the row shows Connecting... for the whole login and clicking it cancels the login. Other VPNs stay usable while a login waits.
Cancelling ends it without a "Failed to connect VPN" toast, which also applies to cancelling the password prompt or a plugin's login dialog.
Other changes I made on the way that I noticed during testing:
network.credentials.closedevent (older shells ignore it), so the API had to be bumped.No new terms to translate.
Type of change
Related issues
Fixes #4366
Screenshots / video
UI bugs fixed here, before:

After:

Checklist
I18n.tr()with translator context, reusing existing terms where possiblemake fmt, added/updated tests,make testpasses, andgo mod tidyis cleanmake lint-qmlwith no new warnings