Proxy Save can leave a partial Default/Tor configuration after a write failure #1093

Open
opened 2026-11-09 18:45:14 +00:00 by jarolrod · 0 comments
jarolrod commented 2026-11-09 18:45:14 +00:00 (Migrated from github.com)

Saving Default proxy and Tor proxy settings can close the editor before all changes have been persisted. If a later write fails, only part of the requested configuration survives.

Reproduced on qt6 at 6e54a48ab571, macOS / Qt 6.9, using an isolated regtest profile.

To reproduce:

  1. Enable Default proxy at 127.0.0.1:9151.
  2. Enable the dedicated Tor proxy at 127.0.0.1:9152.
  3. Click Save while forcing the final settings-file write to fail. The fixture rejected the fourth settings.json.tmp → settings.json rename with EACCES; earlier writes succeeded.
  4. Reopen Proxy settings, then restart the application.

The editor closes despite the failure. A settings error appears in the footer, but reopening shows Default proxy enabled and Tor proxy disabled. The requested Tor address survives only as onion-prev, with no active onion override.

After restart, getnetworkinfo reports 127.0.0.1:9151 for IPv4, IPv6 and onion, rather than the requested dedicated Tor endpoint. An explicit retry saves the intended configuration correctly.

commitProxyDraft() reports that the in-memory changes were accepted, and save() immediately closes the page. Persistence happens asynchronously, so that return value does not establish that the complete configuration was saved.

The editor should retain failed changes for retry and close only after persistence succeeds. If some changes have already been saved, it should make that partial result clear.

The reproduction checked persisted settings and Core’s effective proxy configuration with networking disabled.

Saving Default proxy and Tor proxy settings can close the editor before all changes have been persisted. If a later write fails, only part of the requested configuration survives. Reproduced on `qt6` at `6e54a48ab571`, macOS / Qt 6.9, using an isolated regtest profile. To reproduce: 1. Enable Default proxy at `127.0.0.1:9151`. 2. Enable the dedicated Tor proxy at `127.0.0.1:9152`. 3. Click Save while forcing the final settings-file write to fail. The fixture rejected the fourth `settings.json.tmp` → `settings.json` rename with `EACCES`; earlier writes succeeded. 4. Reopen Proxy settings, then restart the application. The editor closes despite the failure. A settings error appears in the footer, but reopening shows Default proxy enabled and Tor proxy disabled. The requested Tor address survives only as `onion-prev`, with no active `onion` override. After restart, `getnetworkinfo` reports `127.0.0.1:9151` for IPv4, IPv6 **and onion**, rather than the requested dedicated Tor endpoint. An explicit retry saves the intended configuration correctly. `commitProxyDraft()` reports that the in-memory changes were accepted, and `save()` immediately closes the page. Persistence happens asynchronously, so that return value does not establish that the complete configuration was saved. The editor should retain failed changes for retry and close only after persistence succeeds. If some changes have already been saved, it should make that partial result clear. The reproduction checked persisted settings and Core’s effective proxy configuration with networking disabled.
Sign in to join this conversation.
No description provided.