Skip to content

Commit 12e1bc9

Browse files
committed
Release version 5.5.3
2 parents 67f6fe3 + a4d6ebb commit 12e1bc9

5 files changed

Lines changed: 363 additions & 21 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## [5.5.3] - 2026-06-09
2+
### Changed
3+
- Dependency hygiene: exclude duplicate `jakarta.json` from `jena-arq`, align `slf4j-reload4j` to 2.0.17, drop unused `tomcat-coyote`
4+
5+
### Fixed
6+
- `JSONGRDDLFilter` response-side gate scoped per subclass (instance-level property key) with defensive `isApplicable` re-check; prevents cross-fire when multiple subclasses share the client filter chain
7+
18
## [5.5.2] - 2026-06-09
29
### Changed
310
- Left sidebar moved to CSR: `ldh:LeftSidebar` emits its own `left-sidebar` wrapper and is injected via `ixsl:append-content`; SSR `bs2:DocumentTree` placeholder dropped

pom.xml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<groupId>com.atomgraph</groupId>
55
<artifactId>linkeddatahub</artifactId>
6-
<version>5.5.2</version>
6+
<version>5.5.3</version>
77
<packaging>${packaging.type}</packaging>
88

99
<name>AtomGraph LinkedDataHub</name>
@@ -46,7 +46,7 @@
4646
<url>https://github.com/AtomGraph/LinkedDataHub</url>
4747
<connection>scm:git:git://github.com/AtomGraph/LinkedDataHub.git</connection>
4848
<developerConnection>scm:git:git@github.com:AtomGraph/LinkedDataHub.git</developerConnection>
49-
<tag>linkeddatahub-5.5.2</tag>
49+
<tag>linkeddatahub-5.5.3</tag>
5050
</scm>
5151

5252
<repositories>
@@ -135,11 +135,30 @@
135135
<groupId>org.apache.jena</groupId>
136136
<artifactId>jena-arq</artifactId>
137137
<version>6.1.0</version>
138+
<exclusions>
139+
<!-- exclude Glassfish JSON-P bundle (jakarta.json-api 2.0 + impl); Parsson 1.1 (jakarta.json-api 2.1) from jersey-media-json-processing covers Jena's JSON-LD too -->
140+
<exclusion>
141+
<groupId>org.glassfish</groupId>
142+
<artifactId>jakarta.json</artifactId>
143+
</exclusion>
144+
</exclusions>
138145
</dependency>
139146
<dependency>
140147
<groupId>${project.groupId}</groupId>
141148
<artifactId>twirl</artifactId>
142149
<version>1.1.0</version>
150+
<exclusions>
151+
<!-- exclude slf4j-reload4j 1.7.x binding; replaced below with 2.0.x matching slf4j-api from Jena -->
152+
<exclusion>
153+
<groupId>org.slf4j</groupId>
154+
<artifactId>slf4j-reload4j</artifactId>
155+
</exclusion>
156+
</exclusions>
157+
</dependency>
158+
<dependency>
159+
<groupId>org.slf4j</groupId>
160+
<artifactId>slf4j-reload4j</artifactId>
161+
<version>2.0.17</version>
143162
</dependency>
144163
<dependency>
145164
<groupId>${project.groupId}</groupId>
@@ -168,13 +187,6 @@
168187
<artifactId>jsoup</artifactId>
169188
<version>1.22.1</version>
170189
</dependency>
171-
<dependency>
172-
<!-- comes with atomgraph/letsencrypt-tomcat -->
173-
<groupId>org.apache.tomcat</groupId>
174-
<artifactId>tomcat-coyote</artifactId>
175-
<version>10.1.52</version>
176-
<type>jar</type>
177-
</dependency>
178190
<dependency>
179191
<groupId>org.junit.jupiter</groupId>
180192
<artifactId>junit-jupiter</artifactId>

src/main/java/com/atomgraph/linkeddatahub/client/filter/JSONGRDDLFilter.java

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -76,41 +76,45 @@ public JSONGRDDLFilter(XsltCompiler xsltCompiler, String stylesheetPath) throws
7676
if (log.isDebugEnabled()) log.debug("Compiled GRDDL stylesheet from {} for {}", stylesheetPath, getClass().getSimpleName());
7777
}
7878

79-
private static final String ORIGINAL_URI_PROPERTY = "com.atomgraph.linkeddatahub.originalRequestURI";
80-
79+
private final String originalURIProperty = "com.atomgraph.linkeddatahub.originalRequestURI." + getClass().getName();
80+
8181
@Override
8282
public void filter(ClientRequestContext requestContext) throws IOException
8383
{
8484
URI requestURI = requestContext.getUri();
85-
85+
8686
// Check if this request should be processed by the GRDDL filter
8787
if (!isApplicable(requestURI))
8888
return;
89-
89+
9090
// Get the JSON API endpoint URL
9191
URI jsonURI = getJSONURI(requestURI);
9292
if (jsonURI == null)
9393
return;
94-
94+
9595
// Store original URI in request context for thread-safe response processing
96-
requestContext.setProperty(ORIGINAL_URI_PROPERTY, requestURI);
97-
96+
requestContext.setProperty(originalURIProperty, requestURI);
97+
9898
// Redirect request to JSON API endpoint
9999
requestContext.setUri(jsonURI);
100-
100+
101101
if (log.isDebugEnabled()) log.debug("Redirecting request from {} to {}", requestURI, jsonURI);
102102
}
103-
103+
104104
@Override
105105
public void filter(ClientRequestContext requestContext, ClientResponseContext responseContext) throws IOException
106106
{
107107
// Get the original URI from request context
108-
URI originalRequestURI = (URI) requestContext.getProperty(ORIGINAL_URI_PROPERTY);
109-
108+
URI originalRequestURI = (URI) requestContext.getProperty(originalURIProperty);
109+
110110
// Only process responses if we redirected the original request
111111
if (originalRequestURI == null)
112112
return;
113-
113+
114+
// Defensive re-check: same subclass registered twice, or future subclass with shared key
115+
if (!isApplicable(originalRequestURI))
116+
return;
117+
114118
// Check if response is JSON
115119
MediaType contentType = responseContext.getMediaType();
116120
if (contentType == null || !MediaType.APPLICATION_JSON_TYPE.isCompatible(contentType))

0 commit comments

Comments
 (0)