From 8eeb5dee1eca8adc5e5acc4816bfa401e6f846f9 Mon Sep 17 00:00:00 2001 From: Fabio Sinibaldi Date: Wed, 30 Nov 2022 16:32:51 +0100 Subject: [PATCH] Fixes #24226 (unescaped ws name) --- .../application/cms/sdi/plugins/SDIMaterializerPlugin.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sdi-plugins/src/main/java/org/gcube/application/cms/sdi/plugins/SDIMaterializerPlugin.java b/sdi-plugins/src/main/java/org/gcube/application/cms/sdi/plugins/SDIMaterializerPlugin.java index 300cc69..bb9351b 100644 --- a/sdi-plugins/src/main/java/org/gcube/application/cms/sdi/plugins/SDIMaterializerPlugin.java +++ b/sdi-plugins/src/main/java/org/gcube/application/cms/sdi/plugins/SDIMaterializerPlugin.java @@ -131,7 +131,11 @@ public class SDIMaterializerPlugin extends AbstractPlugin implements Materializa else requestArguments.putIfAbsent("layerTitle",fs.getUUID()); //Add FS uuid at ws_baseName - requestArguments.put("workspace",request.getMandatory("workspace")+"_"+ project.getId()); + String ws = request.getMandatory("workspace")+"_"+ project.getId(); + ws = ws.replaceAll("\\W","_"); + log.trace("Escaped WS will be {} ",ws); + + requestArguments.put("workspace",ws); // Actually materializing RegisteredFileSet obtained = getSDIManager().materializeLayer(fs,requestArguments);