neo4j-contrib / neo4j-apoc-procedures

Awesome Procedures On Cypher for Neo4j - codenamed "apoc"                     If you like it, please ★ above ⇧            
https://neo4j.com/labs/apoc
Apache License 2.0
1.7k stars 494 forks source link

Export GraphML checks for read permission instead of write #1004

Closed psuettner closed 5 years ago

psuettner commented 5 years ago

Expected Behavior (Mandatory)

check for write permission

Actual Behavior (Mandatory)

checks for read permission, see https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/3.5/src/main/java/apoc/export/graphml/ExportGraphML.java

private Stream<ProgressInfo> exportGraphML(@Name("file") String fileName, String source, SubGraph graph, ExportConfig config) throws Exception, XMLStreamException {
        FileUtils.checkReadAllowed(fileName);
        ....

How to Reproduce the Problem

in neo4j.conf, set only

apoc.import.file.enabled=true

and call a export graphl function, e.g.

CALL apoc.export.graphml.all('/tmp/metamodel.graphml', {useTypes:true, storeNodeIds:false})

Specifications (Mandatory)

APOC Version 3.5.0.1

conker84 commented 5 years ago

Same as #775 I'll close this