From 37facd21d4739a5cce4b4fe1059559c7169bd05a Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Sat, 4 Nov 2023 12:36:19 +0100 Subject: [PATCH] WebClient shares: fix view pdf files Signed-off-by: Nicola Murino --- internal/httpd/webclient.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/internal/httpd/webclient.go b/internal/httpd/webclient.go index 30863043..53beb238 100644 --- a/internal/httpd/webclient.go +++ b/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"),