From c450dce8351db9376ca1c67bd2cdaf0fc54ce798 Mon Sep 17 00:00:00 2001 From: Andy Hsu Date: Mon, 1 Jan 2024 17:16:07 +0800 Subject: [PATCH] fix: missing modified in validate regexp --- server/handles/meta.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/handles/meta.go b/server/handles/meta.go index e7454d9df5a..00aa3137192 100644 --- a/server/handles/meta.go +++ b/server/handles/meta.go @@ -2,13 +2,13 @@ package handles import ( "fmt" - "regexp" "strconv" "strings" "github.com/alist-org/alist/v3/internal/model" "github.com/alist-org/alist/v3/internal/op" "github.com/alist-org/alist/v3/server/common" + "github.com/dlclark/regexp2" "github.com/gin-gonic/gin" log "github.com/sirupsen/logrus" ) @@ -71,7 +71,7 @@ func UpdateMeta(c *gin.Context) { func validHide(hide string) (string, error) { rs := strings.Split(hide, "\n") for _, r := range rs { - _, err := regexp.Compile(r) + _, err := regexp2.Compile(r, regexp2.None) if err != nil { return r, err }