This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-repoinit-parser.git
commit b0971da37a8404a96a8e2694ec5fdd8a7afa0f8e Author: Timothée Maret <[email protected]> AuthorDate: Tue Sep 19 14:06:25 2017 +0000 SLING-6774 - Allowed character set in repo init is too restrictive * Extend path parser and JCR implementation with valid symbols '+', '@' and ':' git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1808879 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/javacc/RepoInitGrammar.jjt | 2 +- src/test/resources/testcases/test-14-output.txt | 3 +++ src/test/resources/testcases/test-14.txt | 5 +++++ src/test/resources/testcases/test-20-output.txt | 5 ++++- src/test/resources/testcases/test-20.txt | 5 ++++- 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/main/javacc/RepoInitGrammar.jjt b/src/main/javacc/RepoInitGrammar.jjt index 09a2cbe..431550f 100644 --- a/src/main/javacc/RepoInitGrammar.jjt +++ b/src/main/javacc/RepoInitGrammar.jjt @@ -90,7 +90,7 @@ TOKEN: /* The order of these fuzzy statements is important (first match wins?) */ | < NAMESPACED_ITEM: (["a"-"z"] | ["A"-"Z"])+ ":" (["a"-"z"] | ["A"-"Z"])+ > -| < PATH_STRING: "/" (["a"-"z"] | ["A"-"Z"] | ["0"-"9"] | ["-"] | ["_"] | ["."] | ["/"]) * > +| < PATH_STRING: "/" (["a"-"z"] | ["A"-"Z"] | ["0"-"9"] | ["-"] | ["_"] | ["."] | ["@"] | [":"] | ["+"] | ["/"]) * > | < STRING: (["a"-"z"] | ["A"-"Z"] | ["0"-"9"] | ["-"] | ["_"] | ["."] | ["/"] | [":"] | ["*"]) * > | < EOL: "\n" > } diff --git a/src/test/resources/testcases/test-14-output.txt b/src/test/resources/testcases/test-14-output.txt new file mode 100644 index 0000000..8709f7b --- /dev/null +++ b/src/test/resources/testcases/test-14-output.txt @@ -0,0 +1,3 @@ +SetAclPaths on /one:name /two+name /three@name + AclLine REMOVE_ALL {principals=[user1]} + AclLine ALLOW {principals=[user1], privileges=[jcr:read]} diff --git a/src/test/resources/testcases/test-14.txt b/src/test/resources/testcases/test-14.txt new file mode 100644 index 0000000..85c1938 --- /dev/null +++ b/src/test/resources/testcases/test-14.txt @@ -0,0 +1,5 @@ +# Test allowed path characters, see SLING-6774 +set ACL on /one:name,/two+name,/three@name + remove * for user1 + allow jcr:read for user1 +end \ No newline at end of file diff --git a/src/test/resources/testcases/test-20-output.txt b/src/test/resources/testcases/test-20-output.txt index bd8029b..1b2c43d 100644 --- a/src/test/resources/testcases/test-20-output.txt +++ b/src/test/resources/testcases/test-20-output.txt @@ -6,4 +6,7 @@ CreatePath [one(mixin [nt:art]), step(mixin [nt:dance]), two, steps] CreatePath [one(nt:foxtrot), step(nt:foxtrot mixin [nt:dance]), two(nt:foxtrot), steps(nt:foxtrot)] CreatePath [one, step(mixin [nt:dance, nt:art]), two, steps] CreatePath [one, step(nt:foxtrot mixin [nt:dance]), two, steps] -CreatePath [one, step(nt:foxtrot mixin [nt:dance, nt:art]), two, steps] \ No newline at end of file +CreatePath [one, step(nt:foxtrot mixin [nt:dance, nt:art]), two, steps] +CreatePath [one:and, step, two:and, steps] +CreatePath [one@home, step, two@home, steps] +CreatePath [one+tap, step, two+tap, steps] \ No newline at end of file diff --git a/src/test/resources/testcases/test-20.txt b/src/test/resources/testcases/test-20.txt index fce57bf..a987c45 100644 --- a/src/test/resources/testcases/test-20.txt +++ b/src/test/resources/testcases/test-20.txt @@ -7,4 +7,7 @@ create path /one(mixin nt:art)/step(mixin nt:dance)/two/steps create path (nt:foxtrot) /one/step(mixin nt:dance)/two/steps create path /one/step(mixin nt:dance,nt:art)/two/steps create path /one/step(nt:foxtrot mixin nt:dance)/two/steps -create path /one/step(nt:foxtrot mixin nt:dance,nt:art)/two/steps \ No newline at end of file +create path /one/step(nt:foxtrot mixin nt:dance,nt:art)/two/steps +create path /one:and/step/two:and/steps +create path /one@home/step/two@home/steps +create path /one+tap/step/two+tap/steps \ No newline at end of file -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
