Skip to content

Commit

Permalink
修复 IP 查询图表流量统计不显示的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghost-chu committed Nov 7, 2024
1 parent b941c11 commit 24d385c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.ghostchu.peerbanhelper.module.AbstractFeatureModule;
import com.ghostchu.peerbanhelper.module.impl.rule.ActiveMonitoringModule;
import com.ghostchu.peerbanhelper.util.IPAddressUtil;
import com.ghostchu.peerbanhelper.util.MsgUtil;
import com.ghostchu.peerbanhelper.util.context.IgnoreScan;
import com.ghostchu.peerbanhelper.util.paging.Page;
import com.ghostchu.peerbanhelper.util.paging.Pageable;
Expand Down Expand Up @@ -85,7 +86,7 @@ private void handleInfo(Context ctx) throws SQLException {
.selectRaw("SUM(uploaded) as uploaded_total, SUM(downloaded) as downloaded_total")
.groupBy("address")
.where()
.eq("address", new SelectArg(ip))
.eq("address", MsgUtil.escapeSql(ip))
.queryRawFirst();
if (upDownResult != null) {
if (upDownResult.length == 2) {
Expand Down

0 comments on commit 24d385c

Please sign in to comment.