Skip to content

Polish Neo4jChatMemoryRepository. #3025

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

michael-simons
Copy link
Contributor

This change turns all the labels into parameters, avoiding the possibility of Cypher injection as the config does not do any sanitization.
In addition, the interaction with the driver is changed so that it uses transactional functions, which are retried when any communication with the Neo4j DBMS fails.
We can do this here as the repository is not subject to application wide transactions.

An alternative to the parameters for labels would be using Cypher-DSL as we did in other parts of this project to sanitize labels proper.

This change turns all the labels into parameters, avoiding the possibility of Cypher injection as the config does not do any sanitization.
In addition, the interaction with the driver is changed so that it uses transactional functions, which are retried when any communication with the Neo4j DBMS fails.
We can do this here as the repository is not subject to application wide transactions.

An alternative to the parameters for labels would be using Cypher-DSL as we did in other parts of this project to sanitize labels proper.

Signed-off-by: Michael Simons <[email protected]>
@michael-simons michael-simons force-pushed the polish_neo4j_memory branch from 09cef23 to 818b8e4 Compare May 7, 2025 15:02
@markpollack markpollack self-assigned this May 8, 2025
@markpollack markpollack added this to the 1.0.0-RC1 milestone May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants