From ebb48c856178d51fa9573323b88b17718c50d34c Mon Sep 17 00:00:00 2001 From: "453530270@qq.com" Date: Tue, 16 Jul 2024 11:27:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fss/core/serverinfo.go | 2 +- fss/www/index.html | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/fss/core/serverinfo.go b/fss/core/serverinfo.go index e6267fb..8ce676e 100644 --- a/fss/core/serverinfo.go +++ b/fss/core/serverinfo.go @@ -42,7 +42,7 @@ func SerInfo(w http.ResponseWriter, r *http.Request) { // 监听的目录通过?p=的方式传入 urlpath := r.URL.Query().Get("p") // 防止逃逸,造成漏洞 - if strings.Contains(urlpath, "../") { + if strings.Contains(urlpath, "../") || urlpath == "" { urlpath = "." } diff --git a/fss/www/index.html b/fss/www/index.html index c3c73ff..de047d4 100644 --- a/fss/www/index.html +++ b/fss/www/index.html @@ -249,19 +249,15 @@ // var html = ""; $.getJSON(url, function (res) { - // var chgflag; - // res.curdir $.each(res.data.list, function (k, v) { - - - // 处理后的base64 - var bsfn=""; // 判读是否存在 变化 if (!v.dirflag) { // hash相同,未修改 chgflag = v.rehash == v.hash? " nochage" : " hschange"; + }else{ + chgflag ="" } //