Browse Source

WebClient shares: fix view pdf files

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
Nicola Murino 1 năm trước cách đây
mục cha
commit
37facd21d4
1 tập tin đã thay đổi với 1 bổ sung5 xóa
  1. 1 5
      internal/httpd/webclient.go

+ 1 - 5
internal/httpd/webclient.go

@@ -1053,11 +1053,7 @@ func (s *httpdServer) handleShareViewPDF(w http.ResponseWriter, r *http.Request)
 	if err != nil {
 		return
 	}
-	name, err := getBrowsableSharedPath(share, r)
-	if err != nil {
-		s.renderClientMessagePage(w, r, "Invalid share path", "", getRespStatus(err), err, "")
-		return
-	}
+	name := util.CleanPath(r.URL.Query().Get("path"))
 	data := viewPDFPage{
 		Title: path.Base(name),
 		URL: fmt.Sprintf("%s?path=%s&_=%d", path.Join(webClientPubSharesPath, share.ShareID, "getpdf"),