Skip to content

Conversation

@joshtrichards
Copy link
Member

@joshtrichards joshtrichards commented Dec 1, 2024

Summary

#43967 introduced a regression in the handling of the expiration of updater.secret. The result is that updater.secret is expired at the next job interval (~10 minutes). If the web Updater takes >10 minutes this prevents it from continuing.

  • Fixed expiration handling
  • Added logging when we expire the secret
  • Added cleanup of the updater.secret.created value when we expire a secret
  • Added handling for config_is_read_only in the AdminController
  • Changed ResetToken background job unit tests to catch the scenario addressed by this PR
  • Expanded ResetToken background job unit test coverage in general
  • Expanded AdminController unit test coverage in general

TODO

  • Tests: Confirm new tests are working (I eliminated the static used in the ResetToken test since it didn't seem to serve a purpose but I may have broken it so may require another look)

Checklist

@joshtrichards
Copy link
Member Author

/backport to stable30

@joshtrichards joshtrichards force-pushed the fix-updater-secret branch 8 times, most recently from 6ee7f8c to b77688a Compare December 1, 2024 21:18
@joshtrichards joshtrichards marked this pull request as ready for review December 1, 2024 21:24
@joshtrichards joshtrichards added the 3. to review Waiting for reviews label Dec 1, 2024
@blizzz blizzz mentioned this pull request Jan 8, 2025
This was referenced Jan 14, 2025
@Altahrim Altahrim mentioned this pull request Jan 21, 2025
@artonge artonge force-pushed the fix-updater-secret branch from 4624eb3 to a5a65dd Compare October 21, 2025 09:27
@artonge
Copy link
Contributor

artonge commented Oct 21, 2025

  • Rebased
  • Fixed php-cs error
  • Fixed unit test error

@artonge artonge requested a review from nickvergessen October 21, 2025 09:31
@artonge artonge force-pushed the fix-updater-secret branch 2 times, most recently from e53025b to 32de00b Compare October 21, 2025 09:53
Co-authored-by: Joas Schilling <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Louis Chmn <[email protected]>
@artonge artonge force-pushed the fix-updater-secret branch from 32de00b to 7f3ef27 Compare October 21, 2025 10:20
@come-nc come-nc merged commit 30b5f00 into master Oct 21, 2025
232 of 250 checks passed
@come-nc come-nc deleted the fix-updater-secret branch October 21, 2025 14:26
@artonge
Copy link
Contributor

artonge commented Oct 21, 2025

/backport to stable32

@SystemKeeper
Copy link
Contributor

Looks like this will now log a warning on each run, as the default value from getValueInt was removed and no check for non-zero values was added. https://help.nextcloud.com/t/warning-updatenotification-cleared-old-updater-secret-that-was-created-1763885703-seconds-ago-every-hour/236299

@gvanteylingen
Copy link

Experiencing same log issue Cleared old updater.secret that was created xxxxxx seconds ago, twice every 65 minutes after updating to 32.0.2.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Web update cannot continue after long backup Log updater.secret creation and expiration