Skip to content

Commit b580031

Browse files
committed
Release version 5.3.3
2 parents 21bdf94 + 8e26733 commit b580031

File tree

17 files changed

+92
-74
lines changed

17 files changed

+92
-74
lines changed

config/dataspaces.trig

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
@prefix lapp: <https://w3id.org/atomgraph/linkeddatahub/apps#> .
2-
@prefix ldh: <https://w3id.org/atomgraph/linkeddatahub#> .
32
@prefix ac: <https://w3id.org/atomgraph/client#> .
4-
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
5-
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
6-
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
73
@prefix ldt: <https://www.w3.org/ns/ldt#> .
84
@prefix dct: <http://purl.org/dc/terms/> .
9-
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
105

116
### do not use blank nodes to identify resources! ###
127
### urn: URI scheme is used because applications are not accessible in their own dataspace (under $BASE_URI) ###

config/system.trig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
@prefix lapp: <https://w3id.org/atomgraph/linkeddatahub/apps#> .
22
@prefix a: <https://w3id.org/atomgraph/core#> .
3-
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
43
@prefix ldt: <https://www.w3.org/ns/ldt#> .
54
@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
65
@prefix dct: <http://purl.org/dc/terms/> .

docker-compose.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ secrets:
1717
# file: ./secrets/credentials.trig
1818
volumes:
1919
varnish_frontend_cache:
20+
varnish_end_user_cache:
2021
services:
2122
nginx:
2223
image: nginx:1.23.3
@@ -153,8 +154,10 @@ services:
153154
depends_on:
154155
- linkeddatahub
155156
tmpfs: /var/lib/varnish/varnishd:exec
157+
volumes:
158+
- varnish_end_user_cache:/var/lib/varnish
156159
entrypoint: varnishd
157-
command: [ "-F", "-f", "/etc/varnish/default.vcl", "-a", "http=:80,HTTP", "-a", "proxy=:8443,PROXY", "-p", "feature=+http2", "-s", "malloc,1G", "-t", "86400", "-p", "timeout_idle=60s" ] # -F: foreground, -f: config, -a: listeners, -p: http2 + idle timeout, -s: storage, -t: TTL
160+
command: [ "-F", "-f", "/etc/varnish/default.vcl", "-a", "http=:80,HTTP", "-a", "proxy=:8443,PROXY", "-p", "feature=+http2", "-s", "file,/var/lib/varnish/storage.bin,3G", "-t", "86400", "-p", "timeout_idle=60s" ] # -F: foreground, -f: config, -a: listeners, -p: http2 + idle timeout, -s: storage, -t: TTL
158161
email-server:
159162
image: namshi/smtp
160163
environment:
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
# Test that accessing a non-configured dataspace returns 404, not 500
5+
6+
# Try to access admin on non-existent test.localhost dataspace
7+
curl -k -w "%{http_code}\n" -o /dev/null -s \
8+
-H "Accept: application/xhtml+xml" \
9+
"https://admin.non-existing.localhost:4443/" \
10+
| grep -q "$STATUS_NOT_FOUND"
11+
12+
# Try to access end-user on non-existent test.localhost dataspace
13+
curl -k -w "%{http_code}\n" -o /dev/null -s \
14+
-H "Accept: application/xhtml+xml" \
15+
"https://non-existing.localhost:4443/" \
16+
| grep -q "$STATUS_NOT_FOUND"

http-tests/imports/GET-file-404.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
initialize_dataset "$END_USER_BASE_URL" "$TMP_END_USER_DATASET" "$END_USER_ENDPOINT_URL"
5+
initialize_dataset "$ADMIN_BASE_URL" "$TMP_ADMIN_DATASET" "$ADMIN_ENDPOINT_URL"
6+
purge_cache "$END_USER_VARNISH_SERVICE"
7+
purge_cache "$ADMIN_VARNISH_SERVICE"
8+
purge_cache "$FRONTEND_VARNISH_SERVICE"
9+
10+
# add agent to the writers group
11+
add-agent-to-group.sh \
12+
-f "$OWNER_CERT_FILE" \
13+
-p "$OWNER_CERT_PWD" \
14+
--agent "$AGENT_URI" \
15+
"${ADMIN_BASE_URL}acl/groups/writers/"
16+
17+
# Attempt to GET a non-existent upload file using a fake SHA1 hash
18+
file="${END_USER_BASE_URL}uploads/0000000000000000000000000000000000000000"
19+
20+
curl -k -w "%{http_code}\n" -o /dev/null -s -G \
21+
-E "$AGENT_CERT_FILE":"$AGENT_CERT_PWD" \
22+
"$file" \
23+
| grep -q "$STATUS_NOT_FOUND"

platform/entrypoint.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -521,8 +521,6 @@ SECRETARY_URI="${SECRETARY_URI:-${ADMIN_BASE_URI}acl/agents/${SECRETARY_UUID}/#t
521521

522522
OWNER_DATASET_PATH="/var/linkeddatahub/datasets/owner/${OWNER_CERT_ALIAS}.trig"
523523

524-
printf "\n### Owner's WebID URI: %s\n" "$OWNER_URI"
525-
526524
# generate owner's keystore, cert, and public key if the public key does not exist
527525
# store owner's metadata in an RDF dataset
528526
if [ ! -f "$OWNER_PUBLIC_KEY" ]; then
@@ -560,8 +558,6 @@ fi
560558

561559
SECRETARY_DATASET_PATH="/var/linkeddatahub/datasets/secretary/${SECRETARY_CERT_ALIAS}.trig"
562560

563-
printf "\n### Secretary's WebID URI: %s\n" "$SECRETARY_URI"
564-
565561
# generate secretary's keystore, cert, and public key if the public key does not exist
566562
# store secretary's metadata in an RDF dataset
567563
if [ ! -f "$SECRETARY_PUBLIC_KEY" ]; then
@@ -624,6 +620,9 @@ SECRETARY_KEY_URI=$(echo "$secretary_metadata" | xmlstarlet sel -N srx="http://w
624620
SECRETARY_KEY_DOC_URI=$(echo "$SECRETARY_KEY_URI" | sed 's|#this$||')
625621
SECRETARY_KEY_URI="${SECRETARY_KEY_DOC_URI}#this"
626622

623+
printf "\n### Owner's WebID URI: %s\n" "$OWNER_URI"
624+
printf "\n### Secretary's WebID URI: %s\n" "$SECRETARY_URI"
625+
627626
# Note: LOAD_DATASETS check is now done per-app inside the loop
628627

629628
# base the $CONTEXT_DATASET

pom.xml

Lines changed: 2 additions & 2 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.3.2</version>
6+
<version>5.3.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.3.2</tag>
49+
<tag>linkeddatahub-5.3.3</tag>
5050
</scm>
5151

5252
<repositories>

src/main/java/com/atomgraph/linkeddatahub/resource/upload/Item.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ public Item(@Context Request request, @Context UriInfo uriInfo, MediaTypes media
108108
public void init()
109109
{
110110
getResource().getModel().add(describe());
111+
112+
if (getResource().getModel().isEmpty()) throw new NotFoundException("File not found");
111113
}
112114

113115
/**

src/main/java/com/atomgraph/linkeddatahub/server/filter/response/CacheInvalidationFilter.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ public class CacheInvalidationFilter implements ContainerResponseFilter
6060
@Override
6161
public void filter(ContainerRequestContext req, ContainerResponseContext resp) throws IOException
6262
{
63-
// If no application was matched (e.g., non-existent dataspace), skip cache invalidation
64-
if (!getApplication().isPresent()) return;
63+
// If no application was matched (e.g., non-existent dataspace or request scope unavailable), skip cache invalidation
64+
Optional<com.atomgraph.linkeddatahub.apps.model.Application> application = getApplication();
65+
if (application == null || !application.isPresent()) return;
6566

6667
if (req.getMethod().equals(HttpMethod.POST) && resp.getHeaderString(HttpHeaders.LOCATION) != null)
6768
{

src/main/java/com/atomgraph/linkeddatahub/server/filter/response/XsltExecutableFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public Source getSource(String url) throws IOException
189189
try (Response cr = builder.accept(MediaType.TEXT_XSL_TYPE).get())
190190
{
191191
if (!cr.getStatusInfo().getFamily().equals(Response.Status.Family.SUCCESSFUL))
192-
throw new IOException("XSLT stylesheet could not be successfully loaded over HTTP");
192+
throw new IOException("XSLT stylesheet could not be successfully loaded over HTTP. URL: " + uri);
193193

194194
// buffer the stylesheet stream so we can close Response
195195
try (InputStream is = cr.readEntity(InputStream.class))

0 commit comments

Comments
 (0)