owncloud / owncloud/core

[New/old webdav] HTTP response code differ while getting last share information of deleted share

Open
#39,971 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type:Bug
Dominant language
PHP
Stars
8.8k
Forks
2.1k
Avg merge
20h 7m
Merged PRs (30d)
41

Description

Steps to reproduce
  1. create user 'user1' and 'user2'
  2. upload folder 'folder1'
  3. share folder 'folder1' with 'user2'
  4. delete last share with 'user2'
  5. get the information of last share
curl -u user1:password -X GET http://localhost/core/ocs/v2.php/apps/files_sharing/api/v1/shares/{shareid} -v
Expected behaviour

In both new/old webdav, same HTTP status code
HTTP/1.1 404 Not Found

Actual behaviour

In old webdav, HTTP/1.1 200 OK
In new webdav, HTTP/1.1 404 Not Found

Server configuration

Operating system: ubuntu 20.04

Web server: apache2

Database: sqlite

PHP version: 7.4

ownCloud version: (see ownCloud admin page) git master

Updated from an older ownCloud or fresh install: fresh

Where did you install ownCloud from: git

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the GET request to the files_sharing OCS endpoint after deleting the last share, then compare the old and new WebDAV response paths. Done means both paths return HTTP 404 Not Found for the deleted share, with regression coverage for the reported scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.