Skip to content

[stable35] fix: two regressions from the CoreQueryBuilder removal - #1281

Merged
benjaminfrueh merged 3 commits into
stable35from
backport/1269/stable35
Sep 7, 2026
Merged

[stable35] fix: two regressions from the CoreQueryBuilder removal#1281
benjaminfrueh merged 3 commits into
stable35from
backport/1269/stable35

Conversation

@backportbot

@backportbot backportbot Bot commented Sep 7, 2026

Copy link
Copy Markdown

Backport of PR #1269

@backportbot
backportbot Bot requested a review from solracsf September 7, 2026 21:16
@backportbot backportbot Bot added this to the Nextcloud 35 milestone Sep 7, 2026
Since the CoreQueryBuilder removal, FileLock::import() expects database column
names, but the controller feeds it the object itself when a lock is refused and
the jsonSerialize() shape when an unlock is refused. Both 423 answers therefore
died with a TypeError and the client saw a 500 with no lock in it. The same
mismatch broke the remote lock read for federated shares, which passes its own
array.

Keep the lock as an object until the responder serializes it, and let import()
accept the shape jsonSerialize() produces as well as the database one.

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
Spotted by @benjaminfrueh in review.

Making import() tolerant moved this value to the wrong field. The name
a federated lock carries comes from the remote as free text, so it
belongs in displayName, which is where the old 'owner' key put it. As
'userId' it left displayName empty, and the line below appends the host
to it, so the web UI showed a lock owned by plain "@remotehost".

It is also not a local user id. getOwner() feeds nc:lock-owner, which
the frontend compares against the current user to decide whether to
offer unlock, so a remote name that happened to match a local uid would
have offered it wrongly. Nothing sets userId for a remote lock now, as
before.

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
The command had no test at all. This drives it through CommandAdapter,
the same wrapper the console registers it with, so the attribute-based
signature is exercised as the runtime sees it.

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
@benjaminfrueh
benjaminfrueh merged commit 1ed7973 into stable35 Sep 7, 2026
47 checks passed
@benjaminfrueh
benjaminfrueh deleted the backport/1269/stable35 branch September 7, 2026 21:41
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.

2 participants