oscerd opened a new pull request, #23258: URL: https://github.com/apache/camel/pull/23258
## Description `Neo4jProducer.retrieveNodes()` and `deleteNode()` build the Cypher `WHERE` clause from the `CamelNeo4jMatchProperties` JSON map. Property values are passed as bound query parameters (`$paramN`), but property names (the JSON keys) were concatenated into the query string verbatim. A property name containing whitespace or characters that are not valid Cypher identifier characters produced a malformed or unintended query instead of a clear error. ## Changes - Add strict property-name validation (`^[A-Za-z_][A-Za-z0-9_]*$`) applied in both `retrieveNodes()` and `deleteNode()` before the name is used to build the clause. - Reject non-matching names with a clear `IllegalArgumentException`, wrapped in `Neo4jOperationException` consistent with the existing JSON-parse error handling. - Add a unit test covering valid and rejected property names for both operations. This makes property-name handling consistent with the already-parameterised value handling and ensures invalid input fails fast with a meaningful message. Jira: https://issues.apache.org/jira/browse/CAMEL-23528 --- _Claude Code on behalf of Andrea Cosentino_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
