diff --git a/cmd/server/app/network/controller/pluginapi/script.go b/cmd/server/app/network/controller/pluginapi/script.go index b410aab4723386ce6a4e71183370f2591f9b366c..e71c3a2a147c3d24dcbfe347a7086af36fb1fd17 100644 --- a/cmd/server/app/network/controller/pluginapi/script.go +++ b/cmd/server/app/network/controller/pluginapi/script.go @@ -206,7 +206,7 @@ func RunCommandAsyncHandler(c *gin.Context) { name := c.Query("plugin_name") p, err := plugin.GetPlugin(name) if err != nil { - response.Fail(c, nil, "plugin not found: %v"+err.Error()) + response.Fail(c, nil, "plugin not found: "+err.Error()) return } parsedURL, err := url.Parse(p.Url) diff --git a/cmd/server/app/network/controller/script.go b/cmd/server/app/network/controller/script.go index 279fb635f021da92cf42119ff5f5d6852c29b0db..5d7bc6fad9c9bede1e1b603cc3b2214f46f3a1e0 100644 --- a/cmd/server/app/network/controller/script.go +++ b/cmd/server/app/network/controller/script.go @@ -54,4 +54,38 @@ var DangerousCommandsList = []string{ `.*shutdown\s+-[f,F,h,k,n,r,t,C].*`, `.*pvremove\s+-f.*`, `.*vgremove\s+-f.*`, + `.*exportfs\s+-[a,u].*`, + `.*umount.nfs+.*.+-[r,f,rf].*`, + `.*mv+.*.+/dev/null.*`, + `.*reboot.*`, + `.*rmmod\s+-[a,s,v,f,w].*`, + `.*dpkg-divert+.*.+-remove.*`, + `.*dd.*`, + `.*mkfs.*`, + `.*vmo.*`, + `.*init.*`, + `.*halt.*`, + `.*fasthalt.*`, + `.*fastboot.*`, + `.*startsrc.*`, + `.*stopsrc.*`, + `.*chkconfig.*`, + `.*off.*`, + `.*refresh.*`, + `.*umount.*`, + `.*rmdev.*`, + `.*chdev.*`, + `.*extendvg.*`, + `.*reducevg.*`, + `.*importvg.*`, + `.*exportvg.*`, + `.*mklv.*`, + `.*rmlv.*`, + `.*rmfs.*`, + `.*chfs.*`, + `.*installp.*`, + `.*instfix.*`, + `.*crontab.*`, + `.*cfgmgr.*`, + `.*mknod.*`, }