owncloud / owncloud/ocis

policy engine requires remote.php prefix

Open
#7,671 0 comments 0 reactions 0 assignees View on GitHub
Type:Bug
Dominant language
Go
Stars
2.1k
Forks
274
Avg merge
2d 1h
Merged PRs (30d)
103

Description

Currently, the policy middleware in the proxy requires a `/remote.php/` prefix when it tries to determine if it should make a stat request in `proxy/pkg/middleware/policies.go:82`
```go
if resource.Name == "" && filepath.Ext(r.URL.Path) == "" && r.Method == http.MethodPut && strings.HasPrefix(r.URL.Path, "/remote.php/dav/spaces") {
```

1. the `remote.php` prefix needs to die, and requests are already routed correctly without it.
2. not only `/dav/spaces` is a webdav endpoint. `/webdav` and `/dav/files` users are a think as well ... maybe all of `/dav` should be taken into account?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.