Possibly fix #79

This commit is contained in:
Henrique Dias committed 2017-04-15 14:00:41 +01:00
1 parent e46a007c71
commit 056ea2b8bd
6 files changed
+18 -9

No files matched your search

+1 -1
View File
@@ -60,7 +60,7 @@ func (f FileManager) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, err
}
// Checks if the request URL is for the WebDav server
if httpserver.Path(r.URL.Path).Matches(c.BaseURL + c.WebDavURL) {
if httpserver.Path(r.URL.Path).Matches(c.WebDavURL) {
// Checks for user permissions relatively to this PATH
if !user.Allowed(strings.TrimPrefix(r.URL.Path, c.WebDavURL)) {
return http.StatusForbidden, nil