Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: The WebDAV response element must only contain propstat OR status element(s) #1488

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Sep 18, 2023

The response element should look like, see section-14.24 :
<!ELEMENT response (href, ((href*, status)|(propstat+)), error?, responsedescription? , location?) >

Meaning it

  • Must contain a href ✔️
  • Might contain error, responsedescription and location (not implemented by us) ✅
  • Must EITHER contain a status OR one or more propstat elements

So we have to ensure the status is only set if there is no propstat.

@skjnldsv
Copy link

@DeepDiver1975 @evert who have review rights and/or who can we ping to try to get this forward? :)

…tus` element(s)

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux
Copy link
Contributor Author

susnux commented Oct 24, 2023

Fixed the unit tests (some existing ones were expecting incorrect data (status AND a propstat while only on of both is allowed).

@susnux
Copy link
Contributor Author

susnux commented Oct 24, 2023

who have review rights and/or who can we ping to try to get this forward? :)

Maybe @phil-davis ?

@evert
Copy link
Member

evert commented Oct 24, 2023

I don't see a problem with this change, and does seem like we got this wrong. I'm curious if you are running into any incompatibilities with specific clients.

@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

Merging #1488 (abf971d) into master (a74464d) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master    #1488      +/-   ##
============================================
- Coverage     97.34%   97.32%   -0.03%     
  Complexity     2830     2830              
============================================
  Files           175      175              
  Lines          9418     9419       +1     
============================================
- Hits           9168     9167       -1     
- Misses          250      252       +2     
Files Coverage Δ
lib/DAV/Xml/Element/Response.php 93.58% <100.00%> (-2.52%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@skjnldsv
Copy link

I don't see a problem with this change, and does seem like we got this wrong. I'm curious if you are running into any incompatibilities with specific clients.

We actually faced that issue here: nextcloud/server#40474
Rewriting part of our frontend properly, we realized the backend was not responding accordingly :)

We're using the webdav-client node library

@DeepDiver1975 DeepDiver1975 merged commit 2dd0244 into sabre-io:master Nov 8, 2023
10 of 11 checks passed
@susnux susnux deleted the fix/response-status branch November 8, 2023 16:03
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.

Response must not contain stats **and** propstat
4 participants