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

Make sure a {DAV:}prop is not empty #1355

Merged
merged 1 commit into from
Nov 16, 2021

Conversation

kesselb
Copy link
Contributor

@kesselb kesselb commented Oct 9, 2021

Port sabre-io/xml#158 to sabre/dav prop parser.

<?xml version="1.0" encoding="UTF-8"?>
<D:multistatus xmlns:D="DAV:">
  <D:response>
    <D:href>/alfresco/webdav/Webdav/</D:href>
    <D:propstat>
      <D:prop></D:prop>
      <D:status>HTTP/1.1 200 OK</D:status>
    </D:propstat>
    <D:propstat>
      <D:prop>
        <quota-available-bytes/></D:prop>
      <D:status>HTTP/1.1 404 Not Found</D:status>
    </D:propstat>
  </D:response>
</D:multistatus>

Is a multistatus propfind response by Alfresco. XMLReader or Sabre/XML is having troubles to parse the empty element.

Before After
image image
Faulty response (with no elements in propstat) Correct response (with 1+ elements in propstat)

Report: nextcloud/server#16471

@codecov
Copy link

codecov bot commented Nov 2, 2021

Codecov Report

Merging #1355 (43ea1d2) into master (7a638b6) will not change coverage.
The diff coverage is n/a.

❗ Current head 43ea1d2 differs from pull request most recent head c1da060. Consider uploading reports for the commit c1da060 to get more accurate results
Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1355   +/-   ##
=========================================
  Coverage     97.31%   97.31%           
- Complexity     2806     2809    +3     
=========================================
  Files           174      174           
  Lines          7975     7975           
=========================================
  Hits           7761     7761           
  Misses          214      214           
Impacted Files Coverage Δ
lib/DAV/Xml/Element/Response.php 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7a638b6...c1da060. Read the comment docs.

@phil-davis phil-davis force-pushed the check-empty-children branch 3 times, most recently from 77eb320 to 43ea1d2 Compare November 3, 2021 09:59
@phil-davis
Copy link
Contributor

@DeepDiver1975 @staabm I rebased this. I looks good to me. Please review.

@staabm staabm requested a review from evert November 3, 2021 10:05
Copy link
Member

@staabm staabm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me. but I cannot really judge.

@phil-davis phil-davis self-assigned this Nov 15, 2021
@phil-davis
Copy link
Contributor

Assigned myself so that I find this easily and followup. It would be nice to sort out the pending PRs in this repo and make a release in the next few days.

Port sabre-io/xml#158 to the prop parser to sabre/dav

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
@phil-davis phil-davis merged commit 20d39d0 into sabre-io:master Nov 16, 2021
@kesselb kesselb deleted the check-empty-children branch November 16, 2021 08:05
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.

None yet

3 participants