Skip to content

Commit

Permalink
fixed:修复GHSA-gv3w-m57p-3wc4
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelmaxQm committed Apr 9, 2024
1 parent 7bc7c30 commit b1b7427
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server/api/v1/system/sys_auto_code.go
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"net/url"
"os"
"path/filepath"
"strings"

"github.com/flipped-aurora/gin-vue-admin/server/global"
Expand Down Expand Up @@ -253,6 +254,11 @@ func (autoApi *AutoCodeApi) AutoPlug(c *gin.Context) {
response.FailWithMessage(err.Error(), c)
return
}
if strings.Contains(a.PlugName, string(filepath.Separator)) {
response.FailWithMessage("插件名称不能包含"+string(filepath.Separator), c)
return
}

a.Snake = strings.ToLower(a.PlugName)
a.NeedModel = a.HasRequest || a.HasResponse
err = autoCodeService.CreatePlug(a)
Expand Down

0 comments on commit b1b7427

Please sign in to comment.