Skip to content

fix: ensure that the checkPropFind event occurs before httpPropFind [10.16] - #41890

Merged
oc-tmueller merged 1 commit into
10.16from
fix/propfind-check-priority-10.16
Oct 6, 2026
Merged

oc-tmueller merged 1 commit into
10.16from
fix/propfind-check-priority-10.16

Conversation

@oc-tmueller

Copy link
Copy Markdown
Contributor

Backport of cd67d47 from #41797 (master) to 10.16.

Problem

On 10.16.5, a PROPFIND on a path that does not exist returns 207 with a <d:multistatus … start, followed by a NotFound d:error document. 10.16.4 returns 404.

#41787 bumped sabre/event on 10.16 from 5.1.7 to 5.1.9. 5.1.9 no longer sorts listeners of equal priority alphabetically. FilesPlugin::checkPropFind and sabre's CorePlugin::httpPropFind both listen on method:PROPFIND at the default priority of 100, so httpPropFind can now run first and start streaming a 207 before checkPropFind gets the chance to throw NotFound. PHP 7.4's usort is not stable either, so on 10.16 the order of equal-priority listeners is not reliable at all.

Master fixed this together with the same bump in #41797. 10.16 got the bump in #41787 but not this fix.

Change

Register checkPropFind at priority 99, so it always runs before httpPropFind. The commit is cherry-picked unchanged, including its changelog entry.

Verification

The 10.16 acceptance workflow in #41887 runs the API smoke suite against 10.16. Without this fix, all 76 of its unexpected failures are this bug: either should not exist. But API returned 207 without XML in the body, or Exception parsing response body. #41887 will be rebased onto this branch to show that they go away.

🤖 Generated with Claude Code

These two events had the same event priority. They happened to get
in the right order because their event entries were sorted
alphabetically, so "c" came before "h".

Sabre\Event is no longer going to do this alphabetical sorting.
It will trigger events in priority order, and then for events with
the same priority, it will trigger the events in the order that they
have been put into the listeners array. This will make the order of
event execution more transparent.

Signed-off-by: Phillip Davis <[email protected]>
(cherry picked from commit cd67d47)
@oc-tmueller

Copy link
Copy Markdown
Contributor Author

Verified by #41887, which is stacked on this branch: its API smoke suite against 10.16 went from 465/541 scenarios passing, with all 76 failures being this PROPFIND 207-instead-of-404 bug, to 541/541 passing (run 37368515876).

@oc-tmueller oc-tmueller changed the title [10.16] fix: ensure that the checkPropFind event occurs before httpPropFind fix: ensure that the checkPropFind event occurs before httpPropFind [10.16] Oct 6, 2026
number of checkPropFind, increasing its priority, so that it always executes
first, regardless of any other sort order.

https://github.com/owncloud/core/pull/41676

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.

This originally started life in #41676 and was actually merged to master in #41797
I don't think that the PR reference here matters, someone browsing to it will see what happened.

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.

2 participants