Skip to content

Commit

Permalink
Merge pull request #702 from PBH-BTN/master
Browse files Browse the repository at this point in the history
修复 IP 查询图表流量统计不显示的问题
  • Loading branch information
Ghost-chu authored Nov 7, 2024
2 parents 24304b1 + 24d385c commit 1d6479b
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 1d6479b

Please sign in to comment.