diff --git a/Dockerfile b/Dockerfile index e504c7b..5503857 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ From neo4j:5.12.0 LABEL maintainer="yxxx " -COPY target/bytecodedl-pathfinder-1.0.0.jar /var/lib/neo4j/plugins +COPY target/bytecodedl-pathfinder-1.0.1.jar /var/lib/neo4j/plugins ENV NEO4J_AUTH=neo4j/bytecodedl \ NEO4J_dbms_security_procedures_unrestricted=bytecodedl.* \ No newline at end of file diff --git a/README.md b/README.md index 7dcb927..8e9f671 100644 --- a/README.md +++ b/README.md @@ -35,4 +35,4 @@ - 从[releases](https://github.com/BytecodeDL/bytecodedl-pathfinder-neo4j-procedure/releases/)下载最新的jar, 然后放到neo4j的`/var/lib/neo4j/plugins`目录 - 然后在`/var/lib/neo4j/conf/neo4j.conf`增加一行`dbms.security.procedures.unrestricted=bytecodedl.*` - docker - - `docker pull wuxxxxx/neo4j-server:5.12.0-bytecodedl-pathfinder-1.0.0` \ No newline at end of file + - `docker pull wuxxxxx/neo4j-server:5.12.0-bytecodedl-pathfinder-1.0.1` \ No newline at end of file diff --git a/src/main/java/com/bytecodedl/pathfinder/FindAnyOnePath.java b/src/main/java/com/bytecodedl/pathfinder/FindAnyOnePath.java index 9ea1be9..14192e1 100644 --- a/src/main/java/com/bytecodedl/pathfinder/FindAnyOnePath.java +++ b/src/main/java/com/bytecodedl/pathfinder/FindAnyOnePath.java @@ -95,7 +95,7 @@ public List getFirstMultiDispatch(Path path, String callProperty){ } Object property = relationship.getProperty(callProperty); List relationships = startNode.getRelationships(relationship.getType()).stream().filter( - relation ->relation.hasProperty(callProperty) && relation.getProperty(callProperty).equals(property) && !Objects.equals(relation.getProperty("is_deleted", 0), 0) + relation ->relation.hasProperty(callProperty) && relation.getProperty(callProperty).equals(property) && Objects.equals(relation.getProperty("is_deleted", 0), 0) ).collect(Collectors.toList()); if (relationships.size() > 1){ diff --git a/src/test/resources/call_graph.cypher b/src/test/resources/call_graph.cypher index 8d212ac..b8507d0 100644 --- a/src/test/resources/call_graph.cypher +++ b/src/test/resources/call_graph.cypher @@ -12,7 +12,7 @@ CREATE (S1:Sink1 {method:'sink1'}) CREATE (A)-[:Call {insn:'insnAB'}]->(B), (A)-[:Call {insn:'insnAC'}]->(C0), (A)-[:Call {insn:'insnAC'}]->(C1), - (A)-[:Call {insn:'insnAC'}]->(C2), + (A)-[:Call {insn:'insnAC', is_deleted:1}]->(C2), (C0)-[:Call {insn:'insnC0D'}]->(D), (C1)-[:Call {insn:'insnC1S'}]->(S), (C2)-[:Call {insn:'insnC2S'}]->(S),