<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 02/21/2014 06:37 AM,
<a class="moz-txt-link-abbreviated" href="mailto:shaohef@linux.vnet.ibm.com">shaohef@linux.vnet.ibm.com</a> wrote:<br>
</div>
<blockquote
cite="mid:1392975436-22172-1-git-send-email-shaohef@linux.vnet.ibm.com"
type="cite">
<pre wrap="">From: ShaoHe Feng <a class="moz-txt-link-rfc2396E" href="mailto:shaohef@linux.vnet.ibm.com"><shaohef@linux.vnet.ibm.com></a>
Allow dir storage directory path ending with '/'
issue:
<a class="moz-txt-link-freetext" href="https://github.com/kimchi-project/kimchi/issues/316">https://github.com/kimchi-project/kimchi/issues/316</a>
Signed-off-by: ShaoHe Feng <a class="moz-txt-link-rfc2396E" href="mailto:shaohef@linux.vnet.ibm.com"><shaohef@linux.vnet.ibm.com></a>
---
ui/js/src/kimchi.storagepool_add_main.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/js/src/kimchi.storagepool_add_main.js b/ui/js/src/kimchi.storagepool_add_main.js
index ac97e1a..b634ca6 100644
--- a/ui/js/src/kimchi.storagepool_add_main.js
+++ b/ui/js/src/kimchi.storagepool_add_main.js
@@ -167,7 +167,7 @@ kimchi.validateDirForm = function () {
kimchi.message.error.code('KCHPOOL6002E');
return false;
}
- if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(path)) {
+ if (!/((\/([0-9a-zA-Z-_\.]+)\/*?))$/.test(path)) {
kimchi.message.error.code('KCHAPI6003E');
return false;
}
</pre>
</blockquote>
<br>
<font face="DejaVu Sans Mono">The same I commented on: [PATCH] Fix
directory path validation for 'DIR' type storage pool<br>
<br>
</font><br>
<br>
This verification is restricting so much the user.
<br>
I can have any valid path in my system.
<br>
<br>
<i class="moz-txt-slash"><span class="moz-txt-tag">/</span>aline
manera<span class="moz-txt-tag">/</span></i>
<br>
/crístian /
<br>
/阿莲
<br>
<br>
This verification should be done in backend. For UI, we should only
check if the string starts with /
</body>
</html>