From: Bruno Sinou Date: Thu, 21 Mar 2013 18:29:47 +0000 (+0000) Subject: prevent adding a subfolder when user typed name contains a slash X-Git-Tag: argeo-slc-2.1.7~386 X-Git-Url: http://git.argeo.org/?a=commitdiff_plain;h=ff7fa7acc00a2d416009e72e2f4094c863185bcf;p=gpl%2Fargeo-slc.git prevent adding a subfolder when user typed name contains a slash git-svn-id: https://svn.argeo.org/slc/trunk@6190 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- diff --git a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/commands/AddResultFolder.java b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/commands/AddResultFolder.java index bfbd181e3..9ec54eb54 100644 --- a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/commands/AddResultFolder.java +++ b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/commands/AddResultFolder.java @@ -67,6 +67,12 @@ public class AddResultFolder extends AbstractHandler { String folderName = SingleValue.ask("Folder name", "Enter folder name"); if (folderName != null) { + if (folderName.contains("/")) { + ErrorFeedback + .show("Folder names can't contain a '/'."); + return null; + } + String absPath = parentNode.getPath() + "/" + folderName; SlcJcrResultUtils.createResultFolderNode(