brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.91k stars 2.34k forks source link

Disable background updates on Windows #21745

Closed mherrmann closed 3 months ago

mherrmann commented 2 years ago

Description

Brave uses the same update technology as Chrome for automatic updates on Windows ("Google Omaha"). The architecture of this technology is such that updates are (by default) applied in the background, and thus even when Chrome/Brave are not running. Brave has higher standards when it comes to privacy. A process that runs and performs network requests in the background (even with good intentions) violates this principle. The aim of this issue is therefore to change Brave's implementation so updates on Windows are only performed while Brave is running. It grew out of a discussion in #4934, after which @BrendanEich decided and @bridiver reported that this issue should be tackled without waiting for potentially new versions of Google's updater.

Steps to Reproduce

  1. Install an old version of Brave and make sure it is not running.
  2. Delete the registry value HKLM\Software\WOW6432Node\BraveSoftware\Update\LastChecked.
  3. Run the task BraveUpdateTaskMachineUA in the Windows Task Scheduler.
  4. Refresh in the Task Scheduler with F5 until the update task in the Scheduler is no longer running.

Actual result:

Brave is updated. To avoid an on-demand update check, this should be verified not by opening Brave and going to brave://settings/help but by looking at Brave's pv value in registry key HKLM\Software\WOW6432Node\BraveSoftware\Update\Clients.

Expected result:

Brave should not be updated. It should only be updated when Brave is running - either silently, or on-demand when the user goes to brave://settings/help.

Reproduces how often:

Always.

mherrmann commented 3 months ago

We are currently migrating from Sparkle to Omaha 4 for automatic updates on macOS. On macOS, we have the exact situation that is the goal of this issue: Updates are only performed while the browser is running. Still, when we planned the migration from Sparkle to Omaha 4, we decided to mirror upstream's behavior, which by default does apply updates in the background even when the browser isn't running. The main reasons for choosing this approach were security (background updates mean that user usually start the browser at a version with the latest security fixes) and a simpler and thus less risky implementation. We also decided that we want to give users a way to disable automatic updates, should they wish to do so. This should hopefully give us the best of both worlds.

Now, after the above, I see no reason why we wouldn't follow the same approach on Windows, especially because here we already have automatic background updates. So I am closing this issue as unplanned.