diff --git a/src/main/java/com/ghostchu/peerbanhelper/module/impl/webapi/PBHPeerController.java b/src/main/java/com/ghostchu/peerbanhelper/module/impl/webapi/PBHPeerController.java index 0f455728e2..df39530d1e 100644 --- a/src/main/java/com/ghostchu/peerbanhelper/module/impl/webapi/PBHPeerController.java +++ b/src/main/java/com/ghostchu/peerbanhelper/module/impl/webapi/PBHPeerController.java @@ -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; @@ -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) {