Skip to content

fix(accountmanager): check existing account proxy type setting. - #9551

Merged
mgallien merged 1 commit into
masterfrom
bugfix/noid/proxy
Mar 6, 2026
Merged

fix(accountmanager): check existing account proxy type setting.#9551
mgallien merged 1 commit into
masterfrom
bugfix/noid/proxy

Conversation

@camilasan

@camilasan camilasan commented Mar 2, 2026

Copy link
Copy Markdown
Member

The setting networkProxySetting doesn't exist, the correct is networkProxyType to check if user has default before overriding it with global values.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug in AccountManager::migrateNetworkSettings where the wrong settings key ("networkProxySetting") was used to check whether an account is using a default or no proxy. Because that key never existed in the settings, settings.value(networkProxySettingC).toInt() always returned 0, causing global proxy settings to unconditionally override any per-account proxy configuration during migration. The fix removes the bogus constant and instead directly compares the already-read accountProxyType value against QNetworkProxy::NoProxy and QNetworkProxy::DefaultProxy, which is the correct and intended semantics.

Changes:

  • Removed the unused and incorrect networkProxySettingC constant ("networkProxySetting")
  • Replaced the always-true accountProxySetting == 0 check with a semantically correct check against QNetworkProxy::NoProxy and QNetworkProxy::DefaultProxy

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mgallien
mgallien enabled auto-merge March 6, 2026 08:54
The setting networkProxySetting doesn't exist, the correct is
networkProxyType to check if user has default before overriding
it with global values.

Signed-off-by: Camila Ayres <[email protected]>
@mgallien
mgallien force-pushed the bugfix/noid/proxy branch from 9abf446 to 95ef8f8 Compare March 6, 2026 08:56
@github-actions

github-actions Bot commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

Artifact containing the AppImage: nextcloud-appimage-pr-9551.zip

Digest: sha256:d5ce0ac38905eb1fab8b050699734df67375ed3e78a13620165811ffb784926b

To test this change/fix you can download the above artifact file, unzip it, and run it.

Please make sure to quit your existing Nextcloud app and backup your data.

@sonarqubecloud

sonarqubecloud Bot commented Mar 6, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
22 New Code Smells (required ≤ 0)
E Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@mgallien
mgallien merged commit ef42cc4 into master Mar 6, 2026
23 of 24 checks passed
@mgallien
mgallien deleted the bugfix/noid/proxy branch March 6, 2026 09:38
@camilasan

Copy link
Copy Markdown
Member Author

/backport to stable-4.0

@camilasan

Copy link
Copy Markdown
Member Author

/backport to stable-33.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants