空格:id、lib、webhooks

This commit is contained in:
jiangzeyin 2019-03-01 17:33:41 +08:00
parent c4fe9ed9ba
commit 7287fa2b32
3 changed files with 6 additions and 1 deletions

View File

@ -37,7 +37,7 @@ function stop() {
if [[ "$pid" != "" ]]; then
echo -n "boot ( pid $pid) is running"
echo
echo -n $"Shutting down boot: "
echo -n $"Shutting down boot: wait"
kill $(pgrep -f ${Tag}) 2>/dev/null
sleep 3
pid=$(ps -ef | grep -v 'grep' | egrep $Tag| awk '{printf $2 " "}')

View File

@ -121,6 +121,10 @@ public class EditProjectController extends BaseController {
}
}
// 判断空格
if (id.contains(StrUtil.SPACE) || lib.contains(StrUtil.SPACE) || log.contains(StrUtil.SPACE) || token.contains(StrUtil.SPACE)) {
return JsonMessage.getString(401, "项目Id、项目Lib、WebHooks不能包含空格");
}
ProjectInfoModel exits = manageService.getProjectInfo(id);
try {
UserModel userName = getUser();

View File

@ -57,6 +57,7 @@ stop()
wget "$WebClose"
fi
#
echo -n $"Shutting down boot: wait"
kill $(pgrep -f ${Tag}) 2>/dev/null
sleep 3
pid=`getPid`