From 7287fa2b32f9603516c9dc82d73083c20f19a1e0 Mon Sep 17 00:00:00 2001 From: jiangzeyin Date: Fri, 1 Mar 2019 17:33:41 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A9=BA=E6=A0=BC=EF=BC=9Aid=E3=80=81lib?= =?UTF-8?q?=E3=80=81webhooks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/run.sh | 2 +- .../keepbx/jpom/controller/manage/EditProjectController.java | 4 ++++ src/main/resources/bin/command/run_boot.sh | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/run.sh b/bin/run.sh index 0e40c54cf..d0efb0de2 100644 --- a/bin/run.sh +++ b/bin/run.sh @@ -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 " "}') diff --git a/src/main/java/cn/keepbx/jpom/controller/manage/EditProjectController.java b/src/main/java/cn/keepbx/jpom/controller/manage/EditProjectController.java index 36384eabe..356c11cd4 100644 --- a/src/main/java/cn/keepbx/jpom/controller/manage/EditProjectController.java +++ b/src/main/java/cn/keepbx/jpom/controller/manage/EditProjectController.java @@ -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(); diff --git a/src/main/resources/bin/command/run_boot.sh b/src/main/resources/bin/command/run_boot.sh index e1ab724b0..9541980ae 100644 --- a/src/main/resources/bin/command/run_boot.sh +++ b/src/main/resources/bin/command/run_boot.sh @@ -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`