You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by kw...@apache.org on 2022/08/13 14:39:58 UTC

[sling-org-apache-sling-scripting-sightly-testing-content] branch feature/SLING-11538-xss-jsonString created (now d00e401)

This is an automated email from the ASF dual-hosted git repository.

kwin pushed a change to branch feature/SLING-11538-xss-jsonString
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-sightly-testing-content.git


      at d00e401  SLING-11538 add test content for display context "jsonString"

This branch includes the following new commits:

     new d00e401  SLING-11538 add test content for display context "jsonString"

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[sling-org-apache-sling-scripting-sightly-testing-content] 01/01: SLING-11538 add test content for display context "jsonString"

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch feature/SLING-11538-xss-jsonString
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-sightly-testing-content.git

commit d00e401c85d4541b36c2f0b7b9ade7f034dac534
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Sat Aug 13 16:39:54 2022 +0200

    SLING-11538 add test content for display context "jsonString"
---
 .../SLING-INF/apps/sightly/scripts/xss/xss.html     | 21 +++++++++++++++++++++
 src/main/resources/SLING-INF/content/sightly.json   |  4 ++++
 2 files changed, 25 insertions(+)

diff --git a/src/main/resources/SLING-INF/apps/sightly/scripts/xss/xss.html b/src/main/resources/SLING-INF/apps/sightly/scripts/xss/xss.html
new file mode 100644
index 0000000..7e8ece4
--- /dev/null
+++ b/src/main/resources/SLING-INF/apps/sightly/scripts/xss/xss.html
@@ -0,0 +1,21 @@
+<!--/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/-->
+<script type="application/json" id="json-string-1">
+{
+  "field":"${'"	 test'@ context='jsonString'}"
+}
+</script>
\ No newline at end of file
diff --git a/src/main/resources/SLING-INF/content/sightly.json b/src/main/resources/SLING-INF/content/sightly.json
index fbab8f4..5f89ad2 100644
--- a/src/main/resources/SLING-INF/content/sightly.json
+++ b/src/main/resources/SLING-INF/content/sightly.json
@@ -79,6 +79,10 @@
     "inherit": {
         "jcr:primaryType": "nt:unstructured",
         "sling:resourceType": "sightly/scripts/inherit"
+    },
+    "xss": {
+        "jcr:primaryType": "nt:unstructured",
+        "sling:resourceType" : "/apps/sightly/scripts/xss"
     }
 
 }