diff --git a/pom.xml b/pom.xml
index 7f3334f0..7517e1a9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,6 +26,7 @@
2.10.13
2.13.4
4.0.0
+ 6.11
@@ -43,10 +44,9 @@
- com.querydsl
+ io.github.openfeign.querydsl
querydsl-apt
- ${querydsl}
- jakarta
+ ${querydsl_of}
provided
diff --git a/src/test/java/org/springframework/data/couchbase/repository/query/CouchbaseRepositoryQuerydslIntegrationTests.java b/src/test/java/org/springframework/data/couchbase/repository/query/CouchbaseRepositoryQuerydslIntegrationTests.java
index 600b0cb1..cb8d3fea 100644
--- a/src/test/java/org/springframework/data/couchbase/repository/query/CouchbaseRepositoryQuerydslIntegrationTests.java
+++ b/src/test/java/org/springframework/data/couchbase/repository/query/CouchbaseRepositoryQuerydslIntegrationTests.java
@@ -20,6 +20,7 @@ import static com.couchbase.client.java.query.QueryScanConsistency.REQUEST_PLUS;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.springframework.data.couchbase.util.Util.comprises;
import static org.springframework.data.couchbase.util.Util.exactly;
@@ -29,6 +30,7 @@ import java.util.Locale;
import java.util.Optional;
import java.util.stream.StreamSupport;
+import com.querydsl.core.types.dsl.PathBuilder;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
@@ -147,6 +149,13 @@ public class CouchbaseRepositoryQuerydslIntegrationTests extends JavaIntegration
}
}
+ @Test
+ void testInjection() {
+ String userSpecifiedPath = "1 = 1) OR (2";
+ PathBuilder pathBuilder = new PathBuilder<>(QAirline.class, "xyz");
+ assertThrows(IllegalStateException.class, () -> pathBuilder.get(userSpecifiedPath).eq("2"));
+ }
+
// this gives hqCountry == "" and hqCountry is missing
// @Test
void testStringIsEmpty() {