Skip to content

Commit

Permalink
fixed #866
Browse files Browse the repository at this point in the history
  • Loading branch information
devezhao committed Feb 12, 2025
1 parent 14f0619 commit 4853a4d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/com/rebuild/web/admin/AdminCli3.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import com.rebuild.core.support.task.TaskExecutors;
import com.rebuild.utils.AES;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang.StringUtils;

import java.io.File;
Expand Down Expand Up @@ -188,7 +189,8 @@ protected String execSyscfg() {
else {
String value = commands[2];
if (item == ConfigurationItem.SN) {
String usql = String.format("update system_config set `VALUE` = '%s' where `ITEM` = 'SN'", value);
String usql = String.format("update system_config set `VALUE` = '%s' where `ITEM` = 'SN'",
StringEscapeUtils.escapeSql(value));
Application.getSqlExecutor().execute(usql);
// reset: RB NEED RESTART
Application.getCommonsCache().evict(ConfigurationItem.SN.name());
Expand Down

0 comments on commit 4853a4d

Please sign in to comment.