Skip to content

fix(federation): reset retainJob at start of run()#60714

Open
solracsf wants to merge 1 commit into
masterfrom
fix/F4-federation-retainjob-reset
Open

fix(federation): reset retainJob at start of run()#60714
solracsf wants to merge 1 commit into
masterfrom
fix/F4-federation-retainjob-reset

Conversation

@solracsf
Copy link
Copy Markdown
Member

@solracsf solracsf commented May 24, 2026

Summary

JobList::buildJob resolves the job class via Server::get(), and the SimpleContainer caches the resulting instance as a singleton. When the cron loop processes multiple GetSharedSecret or RequestSharedSecret rows in the same pass, the same PHP object is reused, so a prior failure's $this->retainJob = true persisted into the next row's success path. The overridden start() then re-queued an already-successful handshake, causing continuous secret rotation against healthy peers.

Reset $this->retainJob = false at the top of run() so each invocation starts from a known state regardless of prior state on the cached instance.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
@solracsf solracsf added this to the Nextcloud 35 milestone May 24, 2026
@solracsf solracsf requested a review from a team as a code owner May 24, 2026 15:44
@solracsf solracsf requested review from Altahrim, CarlSchwan, leftybournes and salmart-dev and removed request for a team May 24, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant