From 3ad2363b2a7f0d18499b8e3142483b8d38584472 Mon Sep 17 00:00:00 2001 From: srosse <none@none> Date: Fri, 23 Aug 2013 12:18:37 +0200 Subject: [PATCH] no-jira: remove --- pom.xml | 6 - .../FunctionalAdministrationSiteUtil.java | 2 - .../org/olat/util/FunctionalCourseUtil.java | 82 +-- .../olat/util/FunctionalEPortfolioUtil.java | 5 - .../olat/util/FunctionalGroupsSiteUtil.java | 5 - .../org/olat/util/FunctionalHomeSiteUtil.java | 2 - .../util/FunctionalInstantMessagingUtil.java | 3 - .../util/FunctionalRepositorySiteUtil.java | 2 - .../FunctionalUserManagementSiteUtil.java | 6 - .../java/org/olat/util/FunctionalVOUtil.java | 3 - .../java/org/olat/util/FunctionalXssTest.java | 107 ---- .../org/olat/util/xss/NotImplemented.java | 29 - .../java/org/olat/util/xss/XssInjection.java | 33 - .../util/xss/XssInjectionDependencies.java | 29 - .../olat/util/xss/XssInjectionDependency.java | 32 - .../olat/util/xss/XssInjectionElement.java | 33 - .../org/olat/util/xss/XssInjectionIndex.java | 24 - .../olat/util/xss/XssInjectionPositional.java | 29 - .../util/xss/XssInjectionPrerequisite.java | 31 - .../olat/util/xss/XssInjectionProvider.java | 29 - .../org/olat/util/xss/XssInjectionRandom.java | 29 - src/test/java/org/olat/util/xss/XssSuite.java | 33 - .../java/org/olat/util/xss/XssTutorOnly.java | 29 - src/test/java/org/olat/util/xss/XssUtil.java | 33 - .../util/xss/allXssUtilClasses-context.xml | 32 - .../org/olat/util/xss/client/CharsetUtil.java | 42 -- .../org/olat/util/xss/client/HttpUtil.java | 158 ----- .../org/olat/util/xss/client/XssClient.java | 600 ------------------ .../util/xss/client/XssClientDeployments.java | 37 -- .../_ressources/xssClient_HTTP_GET-Header.vm | 12 - .../_ressources/xssClient_HTTP_POST-Header.vm | 16 - .../xssClient_XmlRpcServlet.properties | 1 - .../client/_ressources/xssClient_abstract.vm | 1 - .../_ressources/xssClient_functions.xml | 24 - .../client/_ressources/xssClient_iframe.vm | 1 - .../client/_ressources/xssClient_jquery.js | 1 - .../client/_ressources/xssClient_script.js | 1 - .../_ressources/xssClient_scriptSnippet.vm | 1 - .../xss/client/_ressources/xssClient_tags.xml | 79 --- .../xss/client/_ressources/xssClient_web.xml | 22 - 40 files changed, 14 insertions(+), 1630 deletions(-) delete mode 100644 src/test/java/org/olat/util/FunctionalXssTest.java delete mode 100644 src/test/java/org/olat/util/xss/NotImplemented.java delete mode 100644 src/test/java/org/olat/util/xss/XssInjection.java delete mode 100644 src/test/java/org/olat/util/xss/XssInjectionDependencies.java delete mode 100644 src/test/java/org/olat/util/xss/XssInjectionDependency.java delete mode 100644 src/test/java/org/olat/util/xss/XssInjectionElement.java delete mode 100644 src/test/java/org/olat/util/xss/XssInjectionIndex.java delete mode 100644 src/test/java/org/olat/util/xss/XssInjectionPositional.java delete mode 100644 src/test/java/org/olat/util/xss/XssInjectionPrerequisite.java delete mode 100644 src/test/java/org/olat/util/xss/XssInjectionProvider.java delete mode 100644 src/test/java/org/olat/util/xss/XssInjectionRandom.java delete mode 100644 src/test/java/org/olat/util/xss/XssSuite.java delete mode 100644 src/test/java/org/olat/util/xss/XssTutorOnly.java delete mode 100644 src/test/java/org/olat/util/xss/XssUtil.java delete mode 100644 src/test/java/org/olat/util/xss/allXssUtilClasses-context.xml delete mode 100644 src/test/java/org/olat/util/xss/client/CharsetUtil.java delete mode 100644 src/test/java/org/olat/util/xss/client/HttpUtil.java delete mode 100644 src/test/java/org/olat/util/xss/client/XssClient.java delete mode 100644 src/test/java/org/olat/util/xss/client/XssClientDeployments.java delete mode 100644 src/test/java/org/olat/util/xss/client/_ressources/xssClient_HTTP_GET-Header.vm delete mode 100644 src/test/java/org/olat/util/xss/client/_ressources/xssClient_HTTP_POST-Header.vm delete mode 100644 src/test/java/org/olat/util/xss/client/_ressources/xssClient_XmlRpcServlet.properties delete mode 100644 src/test/java/org/olat/util/xss/client/_ressources/xssClient_abstract.vm delete mode 100644 src/test/java/org/olat/util/xss/client/_ressources/xssClient_functions.xml delete mode 100644 src/test/java/org/olat/util/xss/client/_ressources/xssClient_iframe.vm delete mode 100644 src/test/java/org/olat/util/xss/client/_ressources/xssClient_jquery.js delete mode 100644 src/test/java/org/olat/util/xss/client/_ressources/xssClient_script.js delete mode 100644 src/test/java/org/olat/util/xss/client/_ressources/xssClient_scriptSnippet.vm delete mode 100644 src/test/java/org/olat/util/xss/client/_ressources/xssClient_tags.xml delete mode 100644 src/test/java/org/olat/util/xss/client/_ressources/xssClient_web.xml diff --git a/pom.xml b/pom.xml index 01988b02511..9e370080a09 100644 --- a/pom.xml +++ b/pom.xml @@ -2148,12 +2148,6 @@ </exclusion> </exclusions> </dependency> - <dependency> - <groupId>org.apache.xmlrpc</groupId> - <artifactId>xmlrpc-server</artifactId> - <version>3.1.3</version> - <scope>test</scope> - </dependency> <!-- End test dependencies --> </dependencies> diff --git a/src/test/java/org/olat/util/FunctionalAdministrationSiteUtil.java b/src/test/java/org/olat/util/FunctionalAdministrationSiteUtil.java index d744d79cfce..e09ad352f45 100644 --- a/src/test/java/org/olat/util/FunctionalAdministrationSiteUtil.java +++ b/src/test/java/org/olat/util/FunctionalAdministrationSiteUtil.java @@ -20,7 +20,6 @@ package org.olat.util; import org.olat.util.FunctionalUtil.OlatSite; -import org.olat.util.xss.XssUtil; import com.thoughtworks.selenium.Selenium; @@ -28,7 +27,6 @@ import com.thoughtworks.selenium.Selenium; * * @author jkraehemann, joel.kraehemann@frentix.com, frentix.com */ -@XssUtil public class FunctionalAdministrationSiteUtil { public enum AdministrationSiteAction { diff --git a/src/test/java/org/olat/util/FunctionalCourseUtil.java b/src/test/java/org/olat/util/FunctionalCourseUtil.java index 41e2685bb57..b5e84738f04 100644 --- a/src/test/java/org/olat/util/FunctionalCourseUtil.java +++ b/src/test/java/org/olat/util/FunctionalCourseUtil.java @@ -20,7 +20,6 @@ package org.olat.util; import java.io.IOException; -import java.io.StringWriter; import java.net.MalformedURLException; import java.net.URI; import java.util.StringTokenizer; @@ -28,22 +27,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.commons.lang.ArrayUtils; -import org.apache.velocity.VelocityContext; -import org.apache.velocity.app.VelocityEngine; -import org.apache.velocity.exception.MethodInvocationException; -import org.apache.velocity.exception.ParseErrorException; -import org.apache.velocity.exception.ResourceNotFoundException; -import org.olat.util.xss.NotImplemented; -import org.olat.util.xss.XssInjection; -import org.olat.util.xss.XssInjectionDependencies; -import org.olat.util.xss.XssInjectionDependency; -import org.olat.util.xss.XssInjectionElement; -import org.olat.util.xss.XssInjectionIndex; -import org.olat.util.xss.XssInjectionPositional; -import org.olat.util.xss.XssInjectionProvider; -import org.olat.util.xss.XssInjectionRandom; -import org.olat.util.xss.XssTutorOnly; -import org.olat.util.xss.XssUtil; import com.thoughtworks.selenium.Selenium; @@ -52,7 +35,6 @@ import com.thoughtworks.selenium.Selenium; * * @author jkraehemann, joel.kraehemann@frentix.com, frentix.com */ -@XssUtil public class FunctionalCourseUtil { public final static String COURSE_RUN_CSS = "o_course_run"; @@ -830,9 +812,7 @@ public class FunctionalCourseUtil { * @return true on success * @throws MalformedURLException */ - @XssInjection - @XssTutorOnly - public boolean uploadOverviewPage(Selenium browser, @XssInjectionElement URI file) throws MalformedURLException{ + public boolean uploadOverviewPage(Selenium browser, URI file) throws MalformedURLException{ if(!openCourseEditorCourseTab(browser, CourseEditorCourseTab.OVERVIEW)){ return(false); } @@ -1012,12 +992,10 @@ public class FunctionalCourseUtil { * @param position * @return true on success otherwise false */ - @XssInjection - @XssTutorOnly - public boolean createCourseNode(Selenium browser, @XssInjectionRandom CourseNodeAlias node, - @XssInjectionElement String shortTitle, @XssInjectionElement String longTitle, - @XssInjectionElement String description, - @XssInjectionPositional int position){ + public boolean createCourseNode(Selenium browser, CourseNodeAlias node, + String shortTitle, String longTitle, + String description, + int position){ functionalUtil.idle(browser); /* click on the appropriate link to create node */ @@ -1092,16 +1070,10 @@ public class FunctionalCourseUtil { * @param browser * @return true on success */ - @XssInjection - @XssInjectionDependencies({ - @XssInjectionDependency(className = "org.olat.util.FunctionalEPortfolioUtil", methodName = "createDefaultBinder", parameterName = { "binder" }), - @XssInjectionDependency(className = "org.olat.util.FunctionalEPortfolioUtil", methodName = "createPage", parameterName = { "page" }), - @XssInjectionDependency(className = "org.olat.util.FunctionalEPortfolioUtil", methodName = "createStructure", parameterName = { "structure" }) - }) public boolean addToEportfolio(Selenium browser, String binder, String page, String structure, - @XssInjectionElement String title, @XssInjectionElement String description, - @XssInjectionElement String[] tags, - @XssInjectionProvider FunctionalEPortfolioUtil functionalEPortfolioUtil){ + String title, String description, + String[] tags, + FunctionalEPortfolioUtil functionalEPortfolioUtil){ functionalUtil.idle(browser); @@ -1176,14 +1148,8 @@ public class FunctionalCourseUtil { * @param message * @return true on success, otherwise false */ - @XssInjection - @XssInjectionDependencies({ - @XssInjectionDependency(className = "org.olat.util.FunctionalRepositorySiteUtil", methodName = "createCourse", parameterName = {}), - @XssInjectionDependency(className = "org.olat.util.FunctionalCourseUtil", methodName = "extractRepositoryEntryKey", parameterName = {"courseId"}, useReturnValue = true), - @XssInjectionDependency(className = "org.olat.util.FunctionalCourseUtil", methodName = "createForum", parameterName = {}) - }) - public boolean postForumMessage(Selenium browser, long courseId, @XssInjectionIndex int nthForum, - @XssInjectionElement String title, @XssInjectionElement String message){ + public boolean postForumMessage(Selenium browser, long courseId, int nthForum, + String title, String message){ if(!openForum(browser, courseId, nthForum)) return(false); @@ -1253,17 +1219,8 @@ public class FunctionalCourseUtil { * @param content * @return true on success, otherwise false */ - @XssInjection - @XssInjectionDependencies({ - @XssInjectionDependency(className = "org.olat.util.FunctionalRepositorySiteUtil", methodName = "createCourse", parameterName = {}), - @XssInjectionDependency(className = "org.olat.util.FunctionalRepositorySiteUtil", methodName = "createWiki", parameterName = {}), - @XssInjectionDependency(className = "org.olat.util.FunctionalRepositorySiteUtil", methodName = "readIdFromDetailedView", parameterName = {"wikiId"}, useReturnValue = true), - @XssInjectionDependency(className = "org.olat.util.FunctionalCourseUtil", methodName = "createCourseNode", parameterName = {}), - @XssInjectionDependency(className = "org.olat.util.FunctionalCourseUtil", methodName = "chooseWiki", parameterName = {}) - }) - @NotImplemented(reason = "missing dependencies: read repository entry key") - public boolean createWikiArticle(Selenium browser, long wikiId, - @XssInjectionElement String pagename, @XssInjectionElement String content){ + + public boolean createWikiArticle(Selenium browser, long wikiId, String pagename, String content){ if(!openWiki(browser, wikiId)) return(false); @@ -1379,9 +1336,6 @@ public class FunctionalCourseUtil { * @param url * @return true on success */ - @XssInjection - @XssTutorOnly - @NotImplemented(reason = "test case won't understand url string as url") public boolean importBlogFeed(Selenium browser, String url){ functionalUtil.idle(browser); @@ -1491,16 +1445,8 @@ public class FunctionalCourseUtil { * @param content * @return true on success, otherwise false */ - @XssInjection - @XssInjectionDependencies({ - @XssInjectionDependency(className = "org.olat.util.FunctionalRepositorySiteUtil", methodName = "createCourse", parameterName = {}), - @XssInjectionDependency(className = "org.olat.util.FunctionalRepositorySiteUtil", methodName = "readIdFromDetailedView", parameterName = {"courseId"}, useReturnValue = true) - }) - @NotImplemented(reason = "missing dependencies: read repository entry key") - public boolean editBlogEntry(Selenium browser, long courseId, @XssInjectionIndex int nth, - @XssInjectionElement String title, @XssInjectionElement String description, - @XssInjectionElement String content, - @XssInjectionPositional int entry, @XssInjectionElement BlogEdit[] edit){ + public boolean editBlogEntry(Selenium browser, long courseId, int nth, + String title, String description, String content, int entry, BlogEdit[] edit){ if(!openBlogWithoutBusinessPath(browser, courseId, nth)) return(false); diff --git a/src/test/java/org/olat/util/FunctionalEPortfolioUtil.java b/src/test/java/org/olat/util/FunctionalEPortfolioUtil.java index 3cf1e417d94..b4d962cb598 100644 --- a/src/test/java/org/olat/util/FunctionalEPortfolioUtil.java +++ b/src/test/java/org/olat/util/FunctionalEPortfolioUtil.java @@ -29,11 +29,8 @@ import org.apache.velocity.app.VelocityEngine; import org.apache.velocity.exception.MethodInvocationException; import org.apache.velocity.exception.ParseErrorException; import org.apache.velocity.exception.ResourceNotFoundException; -import org.olat.core.logging.OLog; -import org.olat.core.logging.Tracing; import org.olat.util.FunctionalHomeSiteUtil.EPortfolioAction; import org.olat.util.FunctionalUtil.OlatSite; -import org.olat.util.xss.XssUtil; import com.thoughtworks.selenium.Selenium; @@ -41,9 +38,7 @@ import com.thoughtworks.selenium.Selenium; * * @author jkraehemann, joel.kraehemann@frentix.com, frentix.com */ -@XssUtil public class FunctionalEPortfolioUtil { - private final static OLog log = Tracing.createLoggerFor(FunctionalEPortfolioUtil.class); public final static String EP_ARTEFACTS_BUSINESS_PATH = "EPArtefacts"; public final static String EP_MAPS_BUSINESS_PATH = "EPMaps"; diff --git a/src/test/java/org/olat/util/FunctionalGroupsSiteUtil.java b/src/test/java/org/olat/util/FunctionalGroupsSiteUtil.java index b060e76ab3b..01c9f25e21a 100644 --- a/src/test/java/org/olat/util/FunctionalGroupsSiteUtil.java +++ b/src/test/java/org/olat/util/FunctionalGroupsSiteUtil.java @@ -20,10 +20,7 @@ package org.olat.util; import org.apache.commons.lang.ArrayUtils; -import org.olat.core.logging.OLog; -import org.olat.core.logging.Tracing; import org.olat.util.FunctionalUtil.OlatSite; -import org.olat.util.xss.XssUtil; import com.thoughtworks.selenium.Selenium; @@ -31,9 +28,7 @@ import com.thoughtworks.selenium.Selenium; * * @author jkraehemann, joel.kraehemann@frentix.com, frentix.com */ -@XssUtil public class FunctionalGroupsSiteUtil { - private final static OLog log = Tracing.createLoggerFor(FunctionalGroupsSiteUtil.class); public final static String GROUP_ICON_CSS = "b_group_icon"; public final static String CREATE_GROUP_CSS = "o_sel_group_create"; diff --git a/src/test/java/org/olat/util/FunctionalHomeSiteUtil.java b/src/test/java/org/olat/util/FunctionalHomeSiteUtil.java index 1b7368214e5..a9514112756 100644 --- a/src/test/java/org/olat/util/FunctionalHomeSiteUtil.java +++ b/src/test/java/org/olat/util/FunctionalHomeSiteUtil.java @@ -32,7 +32,6 @@ import org.junit.Assert; import org.olat.core.logging.OLog; import org.olat.core.logging.Tracing; import org.olat.util.FunctionalUtil.OlatSite; -import org.olat.util.xss.XssUtil; import com.thoughtworks.selenium.Selenium; @@ -40,7 +39,6 @@ import com.thoughtworks.selenium.Selenium; * * @author jkraehemann, joel.kraehemann@frentix.com, frentix.com */ -@XssUtil public class FunctionalHomeSiteUtil { private final static OLog log = Tracing.createLoggerFor(FunctionalHomeSiteUtil.class); diff --git a/src/test/java/org/olat/util/FunctionalInstantMessagingUtil.java b/src/test/java/org/olat/util/FunctionalInstantMessagingUtil.java index f998248752a..d92f20dbbbf 100644 --- a/src/test/java/org/olat/util/FunctionalInstantMessagingUtil.java +++ b/src/test/java/org/olat/util/FunctionalInstantMessagingUtil.java @@ -25,15 +25,12 @@ import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.olat.util.xss.XssUtil; - import com.thoughtworks.selenium.Selenium; /** * * @author jkraehemann, joel.kraehemann@frentix.com, frentix.com */ -@XssUtil public class FunctionalInstantMessagingUtil { public final static Pattern CONTACT_COUNT_PATTERN = Pattern.compile("\\(([\\d]+)/([\\d]+)\\)"); diff --git a/src/test/java/org/olat/util/FunctionalRepositorySiteUtil.java b/src/test/java/org/olat/util/FunctionalRepositorySiteUtil.java index dcba8b29928..4a8d507acd9 100644 --- a/src/test/java/org/olat/util/FunctionalRepositorySiteUtil.java +++ b/src/test/java/org/olat/util/FunctionalRepositorySiteUtil.java @@ -26,7 +26,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import org.olat.util.FunctionalUtil.OlatSite; -import org.olat.util.xss.XssUtil; import com.thoughtworks.selenium.Selenium; @@ -35,7 +34,6 @@ import com.thoughtworks.selenium.Selenium; * * @author jkraehemann, joel.kraehemann@frentix.com, frentix.com */ -@XssUtil public class FunctionalRepositorySiteUtil { private final static Pattern categoryPattern = Pattern.compile("/([^/]+)"); diff --git a/src/test/java/org/olat/util/FunctionalUserManagementSiteUtil.java b/src/test/java/org/olat/util/FunctionalUserManagementSiteUtil.java index 63170490262..d87bc221b82 100644 --- a/src/test/java/org/olat/util/FunctionalUserManagementSiteUtil.java +++ b/src/test/java/org/olat/util/FunctionalUserManagementSiteUtil.java @@ -19,19 +19,13 @@ */ package org.olat.util; -import org.olat.core.logging.OLog; -import org.olat.core.logging.Tracing; -import org.olat.util.xss.XssUtil; - import com.thoughtworks.selenium.Selenium; /** * * @author jkraehemann, joel.kraehemann@frentix.com, frentix.com */ -@XssUtil public class FunctionalUserManagementSiteUtil { - private final static OLog log = Tracing.createLoggerFor(FunctionalUserManagementSiteUtil.class); public enum UserManagementSiteAction { USER_SEARCH, diff --git a/src/test/java/org/olat/util/FunctionalVOUtil.java b/src/test/java/org/olat/util/FunctionalVOUtil.java index 58a403a362f..4530744c778 100644 --- a/src/test/java/org/olat/util/FunctionalVOUtil.java +++ b/src/test/java/org/olat/util/FunctionalVOUtil.java @@ -47,8 +47,6 @@ import org.apache.http.entity.mime.content.FileBody; import org.apache.http.entity.mime.content.StringBody; import org.apache.http.util.EntityUtils; import org.junit.Assert; -import org.olat.core.logging.OLog; -import org.olat.core.logging.Tracing; import org.olat.restapi.RestConnection; import org.olat.restapi.support.vo.CourseVO; import org.olat.restapi.support.vo.GroupConfigurationVO; @@ -62,7 +60,6 @@ import org.olat.user.restapi.UserVO; * @author jkraehemann, joel.kraehemann@frentix.com, frentix.com */ public class FunctionalVOUtil { - private final static OLog log = Tracing.createLoggerFor(FunctionalVOUtil.class); public final static String WAIT_LIMIT = "15000"; diff --git a/src/test/java/org/olat/util/FunctionalXssTest.java b/src/test/java/org/olat/util/FunctionalXssTest.java deleted file mode 100644 index 0e5520f2363..00000000000 --- a/src/test/java/org/olat/util/FunctionalXssTest.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * <a href="http://www.openolat.org"> - * OpenOLAT - Online Learning and Training</a><br> - * <p> - * Licensed under the Apache License, Version 2.0 (the "License"); <br> - * you may not use this file except in compliance with the License.<br> - * You may obtain a copy of the License at the - * <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a> - * <p> - * Unless required by applicable law or agreed to in writing,<br> - * software distributed under the License is distributed on an "AS IS" BASIS, <br> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br> - * See the License for the specific language governing permissions and <br> - * limitations under the License. - * <p> - * Initial code contributed and copyrighted by<br> - * frentix GmbH, http://www.frentix.com - * <p> - */ - -package org.olat.util; - -import java.io.IOException; -import java.net.URISyntaxException; -import java.net.URL; -import java.util.List; - -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.drone.api.annotation.Drone; -import org.jboss.arquillian.junit.Arquillian; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.olat.test.ArquillianDeployments; -import org.olat.util.xss.XssSuite; -import org.olat.util.xss.XssUtil; -import org.springframework.beans.factory.annotation.Autowired; - -import com.thoughtworks.selenium.DefaultSelenium; - -/** - * - * @author jkraehemann, joel.kraehemann@frentix.com, frentix.com - */ -@XssSuite -@RunWith(Arquillian.class) -@Ignore -public class FunctionalXssTest { - - @Deployment(testable = false) - public static WebArchive createDeployment() { - return ArquillianDeployments.createDeployment(); - } - - @Drone - DefaultSelenium browser; - - @ArquillianResource - URL deploymentUrl; - - static FunctionalUtil functionalUtil; - - static List<XssUtil> xssClasses; - static List<?> classProvider; - - static boolean initialized = false; - - @Before - public void setup() throws IOException, URISyntaxException{ - if(!initialized){ - functionalUtil = new FunctionalUtil(); - functionalUtil.setDeploymentUrl(deploymentUrl.toString()); - - //TODO:JK: implement me - - initialized = true; - } - } - - @Test - @RunAsClient - void checkHtmlInjection(){ - - } - - @Test - @RunAsClient - void checkBase64Injection(){ - - } - - @Test - @RunAsClient - void checkSimpleJavaScriptInjection(){ - - } - - @Test - @RunAsClient - void checkUTF7Injection(){ - - } -} diff --git a/src/test/java/org/olat/util/xss/NotImplemented.java b/src/test/java/org/olat/util/xss/NotImplemented.java deleted file mode 100644 index 4db6ab85f82..00000000000 --- a/src/test/java/org/olat/util/xss/NotImplemented.java +++ /dev/null @@ -1,29 +0,0 @@ -/** - * <a href="http://www.openolat.org"> - * OpenOLAT - Online Learning and Training</a><br> - * <p> - * Licensed under the Apache License, Version 2.0 (the "License"); <br> - * you may not use this file except in compliance with the License.<br> - * You may obtain a copy of the License at the - * <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a> - * <p> - * Unless required by applicable law or agreed to in writing,<br> - * software distributed under the License is distributed on an "AS IS" BASIS, <br> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br> - * See the License for the specific language governing permissions and <br> - * limitations under the License. - * <p> - * Initial code contributed and copyrighted by<br> - * frentix GmbH, http://www.frentix.com - * <p> - */ - -package org.olat.util.xss; - -/** - * - * @author jkraehemann, joel.kraehemann@frentix.com, frentix.com - */ -public @interface NotImplemented { - String reason(); -} diff --git a/src/test/java/org/olat/util/xss/XssInjection.java b/src/test/java/org/olat/util/xss/XssInjection.java deleted file mode 100644 index 2d66510e38d..00000000000 --- a/src/test/java/org/olat/util/xss/XssInjection.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * <a href="http://www.openolat.org"> - * OpenOLAT - Online Learning and Training</a><br> - * <p> - * Licensed under the Apache License, Version 2.0 (the "License"); <br> - * you may not use this file except in compliance with the License.<br> - * You may obtain a copy of the License at the - * <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a> - * <p> - * Unless required by applicable law or agreed to in writing,<br> - * software distributed under the License is distributed on an "AS IS" BASIS, <br> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br> - * See the License for the specific language governing permissions and <br> - * limitations under the License. - * <p> - * Initial code contributed and copyrighted by<br> - * frentix GmbH, http://www.frentix.com - * <p> - */ - -package org.olat.util.xss; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Target; - -/** - * - * @author jkraehemann, joel.kraehemann@frentix.com, frentix.com - */ -@Target({ ElementType.METHOD }) -public @interface XssInjection { - -} diff --git a/src/test/java/org/olat/util/xss/XssInjectionDependencies.java b/src/test/java/org/olat/util/xss/XssInjectionDependencies.java deleted file mode 100644 index 84f5c2a0356..00000000000 --- a/src/test/java/org/olat/util/xss/XssInjectionDependencies.java +++ /dev/null @@ -1,29 +0,0 @@ -/** - * <a href="http://www.openolat.org"> - * OpenOLAT - Online Learning and Training</a><br> - * <p> - * Licensed under the Apache License, Version 2.0 (the "License"); <br> - * you may not use this file except in compliance with the License.<br> - * You may obtain a copy of the License at the - * <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a> - * <p> - * Unless required by applicable law or agreed to in writing,<br> - * software distributed under the License is distributed on an "AS IS" BASIS, <br> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br> - * See the License for the specific language governing permissions and <br> - * limitations under the License. - * <p> - * Initial code contributed and copyrighted by<br> - * frentix GmbH, http://www.frentix.com - * <p> - */ - -package org.olat.util.xss; - -/** - * - * @author jkraehemann, joel.kraehemann@frentix.com, frentix.com - */ -public @interface XssInjectionDependencies { - XssInjectionDependency[] value(); -} diff --git a/src/test/java/org/olat/util/xss/XssInjectionDependency.java b/src/test/java/org/olat/util/xss/XssInjectionDependency.java deleted file mode 100644 index d2bd532c81e..00000000000 --- a/src/test/java/org/olat/util/xss/XssInjectionDependency.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * <a href="http://www.openolat.org"> - * OpenOLAT - Online Learning and Training</a><br> - * <p> - * Licensed under the Apache License, Version 2.0 (the "License"); <br> - * you may not use this file except in compliance with the License.<br> - * You may obtain a copy of the License at the - * <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a> - * <p> - * Unless required by applicable law or agreed to in writing,<br> - * software distributed under the License is distributed on an "AS IS" BASIS, <br> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br> - * See the License for the specific language governing permissions and <br> - * limitations under the License. - * <p> - * Initial code contributed and copyrighted by<br> - * frentix GmbH, http://www.frentix.com - * <p> - */ - -package org.olat.util.xss; - -/** - * - * @author jkraehemann, joel.kraehemann@frentix.com, frentix.com - */ -public @interface XssInjectionDependency { - String className(); - String methodName(); - String[] parameterName(); - boolean useReturnValue() default false; -} diff --git a/src/test/java/org/olat/util/xss/XssInjectionElement.java b/src/test/java/org/olat/util/xss/XssInjectionElement.java deleted file mode 100644 index c433c16c045..00000000000 --- a/src/test/java/org/olat/util/xss/XssInjectionElement.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * <a href="http://www.openolat.org"> - * OpenOLAT - Online Learning and Training</a><br> - * <p> - * Licensed under the Apache License, Version 2.0 (the "License"); <br> - * you may not use this file except in compliance with the License.<br> - * You may obtain a copy of the License at the - * <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a> - * <p> - * Unless required by applicable law or agreed to in writing,<br> - * software distributed under the License is distributed on an "AS IS" BASIS, <br> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br> - * See the License for the specific language governing permissions and <br> - * limitations under the License. - * <p> - * Initial code contributed and copyrighted by<br> - * frentix GmbH, http://www.frentix.com - * <p> - */ - -package org.olat.util.xss; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Target; - -/** - * - * @author jkraehemann, joel.kraehemann@frentix.com, frentix.com - */ -@Target({ ElementType.PARAMETER }) -public @interface XssInjectionElement { - -} diff --git a/src/test/java/org/olat/util/xss/XssInjectionIndex.java b/src/test/java/org/olat/util/xss/XssInjectionIndex.java deleted file mode 100644 index 12ff8b439b9..00000000000 --- a/src/test/java/org/olat/util/xss/XssInjectionIndex.java +++ /dev/null @@ -1,24 +0,0 @@ -/** - * <a href="http://www.openolat.org"> - * OpenOLAT - Online Learning and Training</a><br> - * <p> - * Licensed under the Apache License, Version 2.0 (the "License"); <br> - * you may not use this file except in compliance with the License.<br> - * You may obtain a copy of the License at the - * <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a> - * <p> - * Unless required by applicable law or agreed to in writing,<br> - * software distributed under the License is distributed on an "AS IS" BASIS, <br> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br> - * See the License for the specific language governing permissions and <br> - * limitations under the License. - * <p> - * Initial code contributed and copyrighted by<br> - * frentix GmbH, http://www.frentix.com - * <p> - */ -package org.olat.util.xss; - -public @interface XssInjectionIndex { - int index() default 0; -} diff --git a/src/test/java/org/olat/util/xss/XssInjectionPositional.java b/src/test/java/org/olat/util/xss/XssInjectionPositional.java deleted file mode 100644 index 2dbc062a074..00000000000 --- a/src/test/java/org/olat/util/xss/XssInjectionPositional.java +++ /dev/null @@ -1,29 +0,0 @@ -/** - * <a href="http://www.openolat.org"> - * OpenOLAT - Online Learning and Training</a><br> - * <p> - * Licensed under the Apache License, Version 2.0 (the "License"); <br> - * you may not use this file except in compliance with the License.<br> - * You may obtain a copy of the License at the - * <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a> - * <p> - * Unless required by applicable law or agreed to in writing,<br> - * software distributed under the License is distributed on an "AS IS" BASIS, <br> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br> - * See the License for the specific language governing permissions and <br> - * limitations under the License. - * <p> - * Initial code contributed and copyrighted by<br> - * frentix GmbH, http://www.frentix.com - * <p> - */ - -package org.olat.util.xss; - -/** - * - * @author jkraehemann, joel.kraehemann@frentix.com, frentix.com - */ -public @interface XssInjectionPositional { - -} diff --git a/src/test/java/org/olat/util/xss/XssInjectionPrerequisite.java b/src/test/java/org/olat/util/xss/XssInjectionPrerequisite.java deleted file mode 100644 index 727613f36a0..00000000000 --- a/src/test/java/org/olat/util/xss/XssInjectionPrerequisite.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * <a href="http://www.openolat.org"> - * OpenOLAT - Online Learning and Training</a><br> - * <p> - * Licensed under the Apache License, Version 2.0 (the "License"); <br> - * you may not use this file except in compliance with the License.<br> - * You may obtain a copy of the License at the - * <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a> - * <p> - * Unless required by applicable law or agreed to in writing,<br> - * software distributed under the License is distributed on an "AS IS" BASIS, <br> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br> - * See the License for the specific language governing permissions and <br> - * limitations under the License. - * <p> - * Initial code contributed and copyrighted by<br> - * frentix GmbH, http://www.frentix.com - * <p> - */ - -package org.olat.util.xss; - -import java.util.List; - -/** - * - * @author jkraehemann, joel.kraehemann@frentix.com, frentix.com - */ -public @interface XssInjectionPrerequisite { - String[] parameters(); -} diff --git a/src/test/java/org/olat/util/xss/XssInjectionProvider.java b/src/test/java/org/olat/util/xss/XssInjectionProvider.java deleted file mode 100644 index 232c1e4e241..00000000000 --- a/src/test/java/org/olat/util/xss/XssInjectionProvider.java +++ /dev/null @@ -1,29 +0,0 @@ -/** - * <a href="http://www.openolat.org"> - * OpenOLAT - Online Learning and Training</a><br> - * <p> - * Licensed under the Apache License, Version 2.0 (the "License"); <br> - * you may not use this file except in compliance with the License.<br> - * You may obtain a copy of the License at the - * <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a> - * <p> - * Unless required by applicable law or agreed to in writing,<br> - * software distributed under the License is distributed on an "AS IS" BASIS, <br> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br> - * See the License for the specific language governing permissions and <br> - * limitations under the License. - * <p> - * Initial code contributed and copyrighted by<br> - * frentix GmbH, http://www.frentix.com - * <p> - */ - -package org.olat.util.xss; - -/** - * - * @author jkraehemann, joel.kraehemann@frentix.com, frentix.com - */ -public @interface XssInjectionProvider { - -} diff --git a/src/test/java/org/olat/util/xss/XssInjectionRandom.java b/src/test/java/org/olat/util/xss/XssInjectionRandom.java deleted file mode 100644 index 41bda64aa6a..00000000000 --- a/src/test/java/org/olat/util/xss/XssInjectionRandom.java +++ /dev/null @@ -1,29 +0,0 @@ -/** - * <a href="http://www.openolat.org"> - * OpenOLAT - Online Learning and Training</a><br> - * <p> - * Licensed under the Apache License, Version 2.0 (the "License"); <br> - * you may not use this file except in compliance with the License.<br> - * You may obtain a copy of the License at the - * <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a> - * <p> - * Unless required by applicable law or agreed to in writing,<br> - * software distributed under the License is distributed on an "AS IS" BASIS, <br> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br> - * See the License for the specific language governing permissions and <br> - * limitations under the License. - * <p> - * Initial code contributed and copyrighted by<br> - * frentix GmbH, http://www.frentix.com - * <p> - */ - -package org.olat.util.xss; - -/** - * - * @author jkraehemann, joel.kraehemann@frentix.com, frentix.com - */ -public @interface XssInjectionRandom { - -} diff --git a/src/test/java/org/olat/util/xss/XssSuite.java b/src/test/java/org/olat/util/xss/XssSuite.java deleted file mode 100644 index 635d2a69402..00000000000 --- a/src/test/java/org/olat/util/xss/XssSuite.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * <a href="http://www.openolat.org"> - * OpenOLAT - Online Learning and Training</a><br> - * <p> - * Licensed under the Apache License, Version 2.0 (the "License"); <br> - * you may not use this file except in compliance with the License.<br> - * You may obtain a copy of the License at the - * <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a> - * <p> - * Unless required by applicable law or agreed to in writing,<br> - * software distributed under the License is distributed on an "AS IS" BASIS, <br> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br> - * See the License for the specific language governing permissions and <br> - * limitations under the License. - * <p> - * Initial code contributed and copyrighted by<br> - * frentix GmbH, http://www.frentix.com - * <p> - */ - -package org.olat.util.xss; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Target; - -/** - * - * @author jkraehemann, joel.kraehemann@frentix.com, frentix.com - */ -@Target({ ElementType.TYPE }) -public @interface XssSuite { - -} diff --git a/src/test/java/org/olat/util/xss/XssTutorOnly.java b/src/test/java/org/olat/util/xss/XssTutorOnly.java deleted file mode 100644 index ea721d15684..00000000000 --- a/src/test/java/org/olat/util/xss/XssTutorOnly.java +++ /dev/null @@ -1,29 +0,0 @@ -/** - * <a href="http://www.openolat.org"> - * OpenOLAT - Online Learning and Training</a><br> - * <p> - * Licensed under the Apache License, Version 2.0 (the "License"); <br> - * you may not use this file except in compliance with the License.<br> - * You may obtain a copy of the License at the - * <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a> - * <p> - * Unless required by applicable law or agreed to in writing,<br> - * software distributed under the License is distributed on an "AS IS" BASIS, <br> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br> - * See the License for the specific language governing permissions and <br> - * limitations under the License. - * <p> - * Initial code contributed and copyrighted by<br> - * frentix GmbH, http://www.frentix.com - * <p> - */ - -package org.olat.util.xss; - -/** - * - * @author jkraehemann, joel.kraehemann@frentix.com, frentix.com - */ -public @interface XssTutorOnly { - -} diff --git a/src/test/java/org/olat/util/xss/XssUtil.java b/src/test/java/org/olat/util/xss/XssUtil.java deleted file mode 100644 index 6cb37ce8039..00000000000 --- a/src/test/java/org/olat/util/xss/XssUtil.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * <a href="http://www.openolat.org"> - * OpenOLAT - Online Learning and Training</a><br> - * <p> - * Licensed under the Apache License, Version 2.0 (the "License"); <br> - * you may not use this file except in compliance with the License.<br> - * You may obtain a copy of the License at the - * <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a> - * <p> - * Unless required by applicable law or agreed to in writing,<br> - * software distributed under the License is distributed on an "AS IS" BASIS, <br> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br> - * See the License for the specific language governing permissions and <br> - * limitations under the License. - * <p> - * Initial code contributed and copyrighted by<br> - * frentix GmbH, http://www.frentix.com - * <p> - */ - -package org.olat.util.xss; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Target; - -/** - * - * @author jkraehemann, joel.kraehemann@frentix.com, frentix.com - */ -@Target({ ElementType.TYPE }) -public @interface XssUtil { - -} diff --git a/src/test/java/org/olat/util/xss/allXssUtilClasses-context.xml b/src/test/java/org/olat/util/xss/allXssUtilClasses-context.xml deleted file mode 100644 index 763ddc4df9a..00000000000 --- a/src/test/java/org/olat/util/xss/allXssUtilClasses-context.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans.xsd"> - - <!-- NOTE: not used, yet --> - <bean class="org.olat.util.FunctionalXssTest"> - <property name="xssClasses"> - <list> - <ref bean="functionalAdministrationSiteUtil"/> - <ref bean="functionalCourseUtil"/> - <ref bean="functionalEPortfolioUtil"/> - <ref bean="functionalGroupsSiteUtil"/> - <ref bean="functionalHomeSiteUtil"/> - <ref bean="functionalInstantMessagingUtil"/> - <ref bean="functionalUserManagementSiteUtil"/> - </list> - </property> - </bean> - - <bean id="functionalAdministrationSiteUtil" class="org.olat.util.FunctionalAdministrationSiteUtil"/> - <bean id="functionalCourseUtil" class="org.olat.util.FunctionalCourseUtil"/> - <bean id="functionalEPortfolioUtil" class="org.olat.util.FunctionalEPortfolioUtil"/> - <bean id="functionalGroupsSiteUtil" class="org.olat.util.FunctionalGroupsSiteUtil"/> - <bean id="functionalHomeSiteUtil" class="org.olat.util.FunctionalHomeSiteUtil"/> - <bean id="functionalInstantMessagingUtil" class="org.olat.util.FunctionalInstantMessagingUtil"/> - <bean id="functionalRepositorySiteUtil" class="org.olat.util.FunctionalRepositorySiteUtil"/> - <bean id="functionalUserManagementSiteUtil" class="org.olat.util.FunctionalUserManagementSiteUtil"/> - -</beans> diff --git a/src/test/java/org/olat/util/xss/client/CharsetUtil.java b/src/test/java/org/olat/util/xss/client/CharsetUtil.java deleted file mode 100644 index c68295293a8..00000000000 --- a/src/test/java/org/olat/util/xss/client/CharsetUtil.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * <a href="http://www.openolat.org"> - * OpenOLAT - Online Learning and Training</a><br> - * <p> - * Licensed under the Apache License, Version 2.0 (the "License"); <br> - * you may not use this file except in compliance with the License.<br> - * You may obtain a copy of the License at the - * <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a> - * <p> - * Unless required by applicable law or agreed to in writing,<br> - * software distributed under the License is distributed on an "AS IS" BASIS, <br> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br> - * See the License for the specific language governing permissions and <br> - * limitations under the License. - * <p> - * Initial code contributed and copyrighted by<br> - * frentix GmbH, http://www.frentix.com - * <p> - */ - -package org.olat.util.xss.client; - -import java.nio.ByteBuffer; -import java.nio.charset.Charset; - -/** - * - * @author jkraehemann, joel.kraehemann@frentix.com, frentix.com - */ -public class CharsetUtil { - public static byte[] encode(String str, String charsetName){ - Charset charset = Charset.forName(charsetName); - - return(charset.encode(str).array()); - } - - public static String decode(byte[] str, String charsetName){ - Charset charset = Charset.forName(charsetName); - - return(charset.decode(ByteBuffer.wrap(str)).toString()); - } -} diff --git a/src/test/java/org/olat/util/xss/client/HttpUtil.java b/src/test/java/org/olat/util/xss/client/HttpUtil.java deleted file mode 100644 index 0c61a399287..00000000000 --- a/src/test/java/org/olat/util/xss/client/HttpUtil.java +++ /dev/null @@ -1,158 +0,0 @@ -/** - * <a href="http://www.openolat.org"> - * OpenOLAT - Online Learning and Training</a><br> - * <p> - * Licensed under the Apache License, Version 2.0 (the "License"); <br> - * you may not use this file except in compliance with the License.<br> - * You may obtain a copy of the License at the - * <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a> - * <p> - * Unless required by applicable law or agreed to in writing,<br> - * software distributed under the License is distributed on an "AS IS" BASIS, <br> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br> - * See the License for the specific language governing permissions and <br> - * limitations under the License. - * <p> - * Initial code contributed and copyrighted by<br> - * frentix GmbH, http://www.frentix.com - * <p> - */ - -package org.olat.util.xss.client; - -import java.io.IOException; -import java.io.StringWriter; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Map.Entry; -import java.util.Set; - -import org.apache.velocity.VelocityContext; -import org.apache.velocity.app.VelocityEngine; -import org.apache.velocity.exception.MethodInvocationException; -import org.apache.velocity.exception.ParseErrorException; -import org.apache.velocity.exception.ResourceNotFoundException; -import org.olat.util.FunctionalEPortfolioUtil; - -/** - * - * @author jkraehemann, joel.kraehemann@frentix.com, frentix.com - */ -public class HttpUtil { - - public final static String DEFAULT_HIJACKED_USER_AGENT = "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)"; - - private String hijackedUserAgent; - - public HttpUtil() { - this.hijackedUserAgent = DEFAULT_HIJACKED_USER_AGENT; - } - - enum HttpMethod { - HTTP_PUT, - HTTP_DELETE, - HTTP_GET, - HTTP_POST, - }; - - public byte[] createHttpGetHeader(String path, String host, - String jsessionId, String headerEncoding){ - - VelocityContext context = new VelocityContext(); - - context.put("path", path); - context.put("host", host); - context.put("userAgent", hijackedUserAgent); - context.put("jsessionId", jsessionId); - - VelocityEngine engine = null; - - engine = new VelocityEngine(); - - StringWriter sw = new StringWriter(); - - try { - engine.evaluate(context, sw, "xssClient_HTTP_GET-Header", HttpUtil.class.getResourceAsStream("xssClient_HTTP_GET-Header.vm")); - - } catch (ParseErrorException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (MethodInvocationException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (ResourceNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - byte[] header = CharsetUtil.encode(sw.toString(), headerEncoding); - - return(header); - } - - public byte[] createHttpPostHeader(String path, String host, - String jsessionId, String headerEncoding, String bodyEncoding, HashMap<String,String> parameters){ - - StringBuffer stringBuffer = new StringBuffer(); - - Set<Entry<String,String>> keys = parameters.entrySet(); - Iterator<Entry<String,String>> iter = keys.iterator(); - - while(iter.hasNext()){ - Entry<String,String> entry = iter.next(); - - stringBuffer.append(entry.getKey()) - .append("=") - .append(CharsetUtil.encode(entry.getValue(), bodyEncoding)) - .append('\n'); - } - - VelocityContext context = new VelocityContext(); - - context.put("path", path); - context.put("host", host); - context.put("userAgent", hijackedUserAgent); - context.put("contentLength", Integer.toString(stringBuffer.length())); - context.put("jsessionId", jsessionId); - context.put("parameters", stringBuffer.toString()); - - VelocityEngine engine = null; - - engine = new VelocityEngine(); - - StringWriter sw = new StringWriter(); - - try { - engine.evaluate(context, sw, "xssClient_HTTP_POST-Header", HttpUtil.class.getResourceAsStream("xssClient_HTTP_POST-Header.vm")); - - } catch (ParseErrorException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (MethodInvocationException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (ResourceNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - byte[] header = CharsetUtil.encode(sw.toString(), headerEncoding); - - return(header); - } - - public String getHijackedUserAgent() { - return hijackedUserAgent; - } - - public void setHijackedUserAgent(String hijackedUserAgent) { - this.hijackedUserAgent = hijackedUserAgent; - } -} diff --git a/src/test/java/org/olat/util/xss/client/XssClient.java b/src/test/java/org/olat/util/xss/client/XssClient.java deleted file mode 100644 index 5eb5751587d..00000000000 --- a/src/test/java/org/olat/util/xss/client/XssClient.java +++ /dev/null @@ -1,600 +0,0 @@ -/** - * <a href="http://www.openolat.org"> - * OpenOLAT - Online Learning and Training</a><br> - * <p> - * Licensed under the Apache License, Version 2.0 (the "License"); <br> - * you may not use this file except in compliance with the License.<br> - * You may obtain a copy of the License at the - * <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a> - * <p> - * Unless required by applicable law or agreed to in writing,<br> - * software distributed under the License is distributed on an "AS IS" BASIS, <br> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br> - * See the License for the specific language governing permissions and <br> - * limitations under the License. - * <p> - * Initial code contributed and copyrighted by<br> - * frentix GmbH, http://www.frentix.com - * <p> - */ - -package org.olat.util.xss.client; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.Socket; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.net.InetSocketAddress; - -import org.apache.xmlrpc.webserver.XmlRpcServlet; - -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.input.SAXBuilder; -import org.olat.util.xss.client.HttpUtil; -import org.olat.util.xss.client.HttpUtil.HttpMethod; - -/** - * WARNING: this software may not be used on public networks especially over an internet - * connection nor within your ISPs WAN. It may potentially damage your infrastructure. - * XssClient should be used carefully and only for error detection. It uses its very own - * implementation of the HTTP protocol and may break international telecommunication contracts. - * - * @author jkraehemann, joel.kraehemann@frentix.com, frentix.com - */ -public class XssClient extends XmlRpcServlet { - - final static String DEFAULT_ENCODING = "UTF-8"; - - final static String DEFAULT_REMOTE_ENCODING = "Unicode"; - final static String DEFAULT_CLIENT_ENCODING = "iso-8859-1"; - final static String DEFAULT_BODY_ENCODING = "UTF-16"; - final static String DEFAULT_SCRIPT_ENCODING = "UTF-7"; - - final static int DEFAULT_FIELD_LENGTH_LIMITATION = 255; - - final static int DEFAULT_THREAD_COUNT = 100; - final static int DEFAULT_FAKE_USER_COUNT = 100; - final static int DEFAULT_CONCURRENT_USER_COUNT = 100; - final static int DEFAULT_DISTRIBUTED_CHUNK_SIZE = 65535; - - final static String DEFAULT_ESCAPING_PATTERN = "\\\\\\//"; - final static String DEFAULT_CLOSING_TAGS_PATTERN = "</body></html>${\"xssCommonInjectionCode\"}"; - final static String DEFAULT_CLOSING_JSON_PATTERN = "',xssAlert: ${\"xssJSonInjectionCode\"};{"; - final static String DEFAULT_COMMENT_OUT_PATTERN = "${\"xssInlineInjectionCode\"}<!--"; - final static String DEFAULT_SCRIPTIFY_PATTERN = "${\"xssInlineInjectionCode\"}<javascript>"; - final static String DEFAULT_FRAMIFY_PATTERN = "${\"xssInlineInjectionCode\"}<frame src=\"javascript:void(){window.document.body}\" />"; - final static String DEFAULT_IFRAMIFY_PATTERN = "${\"xssInlineInjectionCode\"}<iframe src=\"javascript:void(){window.document.body}\" />"; - final static String DEFAULT_TOPLEVEL_FRAME_PATTERN = "<iframe style=\"z-index: -1;\" src=\"javascript:void(){${\"xssSnippedInjectionCode\"}}\">"; - final static String DEFAULT_B_MAIN_ONLY_PATTERN = "<div id=\"b_main\" class=\"javascript:void(){${\"xssSnippedInjectionCode\"}}\"/>"; - - enum XssStrategy{ - TRICK_ESCAPING, - CLOSE_TAGS, - COMMENT_OUT, - SCRIPTIFY, - FRAMEIFY, - IFRAMIFY, - TOPLEVEL_FRAME, - B_MAIN_ONLY, - CLOSE_JSON, - MASQUERADE_ENCODING, - FAKE_USERS, - CONCURRENT_USERS, - RANDOM_ENCODING, - PACKAGE_FRAGMENTS, - GENERATE_DATABASE_TIMEOUTS, - LOW_LATENCY_RESEND, - } - - private String defaultEncoding; - - private String remoteEncoding; - private String clientEncoding; - private String bodyEncoding; - private String scriptEncoding; - - private byte[] header; - private byte[] jsessionId; - - private Socket connection; - - private int fieldLengthLimitation; - - private int threadCount; - private int fakeUserCount; - private int concurrentUserCount; - private int distributedChunkSize; - - private String escapingPattern; - private String closingTagsPattern; - private String commentOutPattern; - private String scriptifyPattern; - private String framifyPattern; - private String iframeifyPattern; - private String toplevelFramePattern; - private String bMainOnlyPattern; - - private List<Script> scripts; - - private HttpUtil httpUtil; - - public XssClient(){ - this.defaultEncoding = DEFAULT_ENCODING; - - this.remoteEncoding = DEFAULT_REMOTE_ENCODING; - this.clientEncoding = DEFAULT_CLIENT_ENCODING; - this.bodyEncoding = DEFAULT_BODY_ENCODING; - this.scriptEncoding = DEFAULT_SCRIPT_ENCODING; - - this.connection = new Socket(); - - this.fieldLengthLimitation = DEFAULT_FIELD_LENGTH_LIMITATION; - - this.threadCount = DEFAULT_THREAD_COUNT; - this.fakeUserCount = DEFAULT_FAKE_USER_COUNT; - this.concurrentUserCount = DEFAULT_CONCURRENT_USER_COUNT; - this.distributedChunkSize = DEFAULT_DISTRIBUTED_CHUNK_SIZE; - - this.escapingPattern = DEFAULT_ESCAPING_PATTERN; - this.closingTagsPattern = DEFAULT_CLOSING_TAGS_PATTERN; - this.commentOutPattern = DEFAULT_COMMENT_OUT_PATTERN; - this.scriptifyPattern = DEFAULT_SCRIPTIFY_PATTERN; - this.framifyPattern = DEFAULT_FRAMIFY_PATTERN; - this.iframeifyPattern = DEFAULT_IFRAMIFY_PATTERN; - this.toplevelFramePattern = DEFAULT_TOPLEVEL_FRAME_PATTERN; - this.bMainOnlyPattern = DEFAULT_B_MAIN_ONLY_PATTERN; - - this.scripts = new ArrayList<Script>(); - - this.httpUtil = new HttpUtil(); - - reloadScripts(); - } - - public void reloadScripts(){ - Script script = new CommonScript(); - script.load(); - scripts.add(script); - - script = new InlineScript(); - script.load(); - scripts.add(script); - - script = new IFrameScript(); - script.load(); - scripts.add(script); - } - - public void connect(String host, int port) throws IOException { - connection.connect(new InetSocketAddress(host, port)); - } - - public void setHttpHeader(byte[] buffer) { - this.header = buffer; - } - - private HashMap<String,String> trickEscaping(HashMap<String,String> parameter, int space){ - - if(parameter == null){ - return(null); - } - - HashMap<String,String> injectionCode = new HashMap<String,String>(); - Iterator<String> iter = parameter.keySet().iterator(); - int iNext = escapingPattern.length(); - - while(iter.hasNext()){ - String key = iter.next(); - StringBuffer stringBuffer = new StringBuffer(); - - for(int i = 0; - iNext < fieldLengthLimitation && - iNext < distributedChunkSize && - iNext < space; - i = iNext){ - stringBuffer.append(escapingPattern); - - iNext = i + escapingPattern.length(); - } - - injectionCode.put(key, stringBuffer.toString()); - } - - return(injectionCode); - } - - private HashMap<String,String> closeTags(HashMap<String,String> parameter, int space){ - - if(parameter == null){ - return(null); - } - - HashMap<String,String> injectionCode = new HashMap<String,String>(); - Iterator<String> iter = parameter.keySet().iterator(); - int iNext = escapingPattern.length(); - - while(iter.hasNext()){ - String key = iter.next(); - StringBuffer stringBuffer = new StringBuffer(); - - for(int i = 0; - iNext < fieldLengthLimitation && - iNext < distributedChunkSize && - iNext < space; - i = iNext){ - stringBuffer.append(closingTagsPattern); - - iNext = i + closingTagsPattern.length(); - } - - injectionCode.put(key, stringBuffer.toString()); - } - - return(injectionCode); - } - - private HashMap<String,String> commentOut(HashMap<String,String> parameter){ - HashMap<String,String> injectionCode = new HashMap<String,String>(); - - //TODO:JK: implement me - - return(injectionCode); - - } - - private HashMap<String,String> scriptify(HashMap<String,String> parameter){ - HashMap<String,String> injectionCode = new HashMap<String,String>(); - - //TODO:JK: implement me - - return(injectionCode); - - } - - private HashMap<String,String> frameify(HashMap<String,String> parameter){ - HashMap<String,String> injectionCode = new HashMap<String,String>(); - - //TODO:JK: implement me - - return(injectionCode); - - } - - private HashMap<String,String> b_main_only(HashMap<String,String> parameter){ - HashMap<String,String> injectionCode = new HashMap<String,String>(); - - //TODO:JK: implement me - - return(injectionCode); - - } - - private HashMap<String,String> applyStrategy(XssStrategy[] strategy, HashMap<String,String> parameter){ - HashMap<String,String> injectionCode = new HashMap<String,String>(); - - //TODO:JK: implement me - - return(injectionCode); - } - - public void attack(String path, - HttpMethod method, HashMap<String,String> parameter, String jsessionId, - XssStrategy[] strategy, String snipped, boolean distributed) throws IOException{ - this.attack("localhost", 8080, path, - method, parameter, jsessionId, - strategy, snipped, distributed); - } - - private void attack(String host, int port, String path, - HttpMethod method, HashMap<String,String> parameter, String jsessionId, - XssStrategy[] strategy, String snipped, boolean distributed) throws IOException { - connect(host, port); - - //TODO:JK: implement other methods - byte[] header = null; - - switch(method){ - case HTTP_GET: - { - header = httpUtil.createHttpGetHeader(path, host + ":" + port, - jsessionId, getClientEncoding()); - } - break; - case HTTP_POST: - { - HashMap<String,String> injectionCode = applyStrategy(strategy, parameter); - - header = httpUtil.createHttpPostHeader(path, host + ":" + port, - jsessionId, getClientEncoding(), getBodyEncoding(), injectionCode); - } - break; - default: - break; - } - - OutputStream out = connection.getOutputStream(); - out.write(header); - } - - public String getDefaultEncoding() { - return defaultEncoding; - } - - public void setDefaultEncoding(String defaultEncoding) { - this.defaultEncoding = defaultEncoding; - } - - public String getRemoteEncoding() { - return remoteEncoding; - } - - public void setRemoteEncoding(String remoteEncoding) { - this.remoteEncoding = remoteEncoding; - } - - public String getClientEncoding() { - return clientEncoding; - } - - public void setClientEncoding(String clientEncoding) { - this.clientEncoding = clientEncoding; - } - - public String getBodyEncoding() { - return bodyEncoding; - } - - public void setBodyEncoding(String bodyEncoding) { - this.bodyEncoding = bodyEncoding; - } - - public String getScriptEncoding() { - return scriptEncoding; - } - - public void setScriptEncoding(String scriptEncoding) { - this.scriptEncoding = scriptEncoding; - } - - public byte[] getHeader() { - return header; - } - - public void setHeader(byte[] header) { - this.header = header; - } - - public byte[] getJSessionId() { - return jsessionId; - } - - public void setJSessionId(byte[] jsessionId) { - this.jsessionId = jsessionId; - } - - public Socket getConnection() { - return connection; - } - - public void setConnection(Socket connection) { - this.connection = connection; - } - - public int getFieldLengthLimitation() { - return fieldLengthLimitation; - } - - public void setFieldLengthLimitation(int fieldLengthLimitation) { - this.fieldLengthLimitation = fieldLengthLimitation; - } - - public int getThreadCount() { - return threadCount; - } - - public void setThreadCount(int threadCount) { - this.threadCount = threadCount; - } - - public int getFakeUserCount() { - return fakeUserCount; - } - - public void setFakeUserCount(int fakeUserCount) { - this.fakeUserCount = fakeUserCount; - } - - public int getConcurrentUserCount() { - return concurrentUserCount; - } - - public void setConcurrentUserCount(int concurrentUserCount) { - this.concurrentUserCount = concurrentUserCount; - } - - public int getDistributedChunkSize() { - return distributedChunkSize; - } - - public void setDistributedChunkSize(int distributedChunkSize) { - this.distributedChunkSize = distributedChunkSize; - } - - public String getEscapingPattern() { - return escapingPattern; - } - - public void setEscapingPattern(String escapingPattern) { - this.escapingPattern = escapingPattern; - } - - public String getClosingTagsPattern() { - return closingTagsPattern; - } - - public void setClosingTagsPattern(String closingTagsPattern) { - this.closingTagsPattern = closingTagsPattern; - } - - public String getCommentOutPattern() { - return commentOutPattern; - } - - public void setCommentOutPattern(String commentOutPattern) { - this.commentOutPattern = commentOutPattern; - } - - public String getScriptifyPattern() { - return scriptifyPattern; - } - - public void setScriptifyPattern(String scriptifyPattern) { - this.scriptifyPattern = scriptifyPattern; - } - - public String getFramifyPattern() { - return framifyPattern; - } - - public void setFramifyPattern(String framifyPattern) { - this.framifyPattern = framifyPattern; - } - - public String getIframeifyPattern() { - return iframeifyPattern; - } - - public void setIframeifyPattern(String iframeifyPattern) { - this.iframeifyPattern = iframeifyPattern; - } - - public String getToplevelFramePattern() { - return toplevelFramePattern; - } - - public void setToplevelFramePattern(String toplevelFramePattern) { - this.toplevelFramePattern = toplevelFramePattern; - } - - public String getbMainOnlyPattern() { - return bMainOnlyPattern; - } - - public void setbMainOnlyPattern(String bMainOnlyPattern) { - this.bMainOnlyPattern = bMainOnlyPattern; - } - - public List<Script> getScripts() { - return scripts; - } - - public void setScripts(List<Script> scripts) { - this.scripts = scripts; - } - - public abstract class Script{ - private HashMap<String,List<String>> tags; - private List<String> variants; - - public Script(){ - tags = new HashMap<String,List<String>>(); - - try { - loadTags(); - } catch (JDOMException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - variants = new ArrayList<String>(); - } - - public abstract void load(); - - public List<String> readAttributes(List<?> attributesNode){ - List<String> attributes = new ArrayList<String>(); - - for(Object current: attributesNode){ - if(current instanceof Element){ - Element currentAttribute = (Element) current; - - attributes.add(currentAttribute.getAttributeValue("name")); - } - } - - return(attributes); - } - - public void loadTags() throws JDOMException, IOException{ - SAXBuilder sax = new SAXBuilder(); - Document tagDocument = sax.build(XssClient.class.getResourceAsStream("xssClient_tags.xml")); - - Element rootNode = tagDocument.getRootElement(); - - List<?> tagsNode = rootNode.getChildren(); - - for(Object current: tagsNode){ - if(current instanceof Element){ - Element currentNode = (Element) current; - - tags.put(currentNode.getAttributeValue("name"), - readAttributes(currentNode.getChildren())); - } - } - } - - - public HashMap<String, List<String>> getTags() { - return tags; - } - - public void setTags(HashMap<String, List<String>> tags) { - this.tags = tags; - } - - public List<String> getVariants() { - return variants; - } - - public void setVariants(List<String> variants) { - this.variants = variants; - } - } - - public class CommonScript extends Script { - - @Override - public void load() { - // TODO Auto-generated method stub - - } - } - - public class InlineScript extends Script { - - @Override - public void load() { - // TODO Auto-generated method stub - - } - } - - public class IFrameScript extends Script { - - @Override - public void load() { - // TODO Auto-generated method stub - - } - } -} diff --git a/src/test/java/org/olat/util/xss/client/XssClientDeployments.java b/src/test/java/org/olat/util/xss/client/XssClientDeployments.java deleted file mode 100644 index d0b1b0efe0f..00000000000 --- a/src/test/java/org/olat/util/xss/client/XssClientDeployments.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * <a href="http://www.openolat.org"> - * OpenOLAT - Online Learning and Training</a><br> - * <p> - * Licensed under the Apache License, Version 2.0 (the "License"); <br> - * you may not use this file except in compliance with the License.<br> - * You may obtain a copy of the License at the - * <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a> - * <p> - * Unless required by applicable law or agreed to in writing,<br> - * software distributed under the License is distributed on an "AS IS" BASIS, <br> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br> - * See the License for the specific language governing permissions and <br> - * limitations under the License. - * <p> - * Initial code contributed and copyrighted by<br> - * frentix GmbH, http://www.frentix.com - * <p> - */ - -package org.olat.util.xss.client; - -import java.io.InputStream; - -/** - * - * @author jkraehemann, joel.kraehemann@frentix.com, frentix.com - */ -public class XssClientDeployments { - - public static void createDeployment(String webapp, String xmlRpcServletProperties, String webXml){ - - InputStream webArchive = XssClientDeployments.class.getResourceAsStream(webapp); - - //TODO:JK: implement me - } -} diff --git a/src/test/java/org/olat/util/xss/client/_ressources/xssClient_HTTP_GET-Header.vm b/src/test/java/org/olat/util/xss/client/_ressources/xssClient_HTTP_GET-Header.vm deleted file mode 100644 index bc43edbdb74..00000000000 --- a/src/test/java/org/olat/util/xss/client/_ressources/xssClient_HTTP_GET-Header.vm +++ /dev/null @@ -1,12 +0,0 @@ -GET ${"path"} HTTP/1.1 -Host: ${"host"} -User-Agent: ${"userAgent"} -Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 -Accept-Language: en-us,en;q=0.5 -Accept-Encoding: gzip,deflate -Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 -Keep-Alive: 300 -Connection: keep-alive -Cookie: JSESSIONID=${"jsessionId"} -Pragma: no-cache -Cache-Control: no-cache diff --git a/src/test/java/org/olat/util/xss/client/_ressources/xssClient_HTTP_POST-Header.vm b/src/test/java/org/olat/util/xss/client/_ressources/xssClient_HTTP_POST-Header.vm deleted file mode 100644 index b08421162c1..00000000000 --- a/src/test/java/org/olat/util/xss/client/_ressources/xssClient_HTTP_POST-Header.vm +++ /dev/null @@ -1,16 +0,0 @@ -POST ${"path"} HTTP/1.1 -Host: ${"host"} -User-Agent: ${"userAgent"} -Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 -Accept-Language: en-us,en;q=0.5 -Accept-Encoding: gzip,deflate -Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 -Keep-Alive: 300 -Connection: keep-alive -Content-Type: application/x-www-form-urlencoded -Content-Length: ${"contentLength"} -Cookie: JSESSIONID=${"jsessionId"} -Pragma: no-cache -Cache-Control: no-cache - -${"parameters"} diff --git a/src/test/java/org/olat/util/xss/client/_ressources/xssClient_XmlRpcServlet.properties b/src/test/java/org/olat/util/xss/client/_ressources/xssClient_XmlRpcServlet.properties deleted file mode 100644 index 360278c8088..00000000000 --- a/src/test/java/org/olat/util/xss/client/_ressources/xssClient_XmlRpcServlet.properties +++ /dev/null @@ -1 +0,0 @@ -XssClient=org.olat.util.xss.client.XssClient diff --git a/src/test/java/org/olat/util/xss/client/_ressources/xssClient_abstract.vm b/src/test/java/org/olat/util/xss/client/_ressources/xssClient_abstract.vm deleted file mode 100644 index 98be3aa6718..00000000000 --- a/src/test/java/org/olat/util/xss/client/_ressources/xssClient_abstract.vm +++ /dev/null @@ -1 +0,0 @@ -<${"tag"} ${"function"}="${script}"></${"tag"}> diff --git a/src/test/java/org/olat/util/xss/client/_ressources/xssClient_functions.xml b/src/test/java/org/olat/util/xss/client/_ressources/xssClient_functions.xml deleted file mode 100644 index fb8179a2953..00000000000 --- a/src/test/java/org/olat/util/xss/client/_ressources/xssClient_functions.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<browsers> - <browser name="Microsoft Internet Explorer" version="6"> - <specification version="5.0"> - <functions> - <function>onLoad</function> - <function>onMouse</function> - <function>onMouseOver</function> - <function>onMouseOut</function> - <function>onClick</function> - <function>onMotion</function> - <function>onKeyEvent</function> - <function>event</function> - </functions> - </specification> - </browser> - <browser name="Firefox" version="22"> - <specification version="5.0"> - <functions> - <function>event</function> - </functions> - </specification> - </browser> -</browsers> diff --git a/src/test/java/org/olat/util/xss/client/_ressources/xssClient_iframe.vm b/src/test/java/org/olat/util/xss/client/_ressources/xssClient_iframe.vm deleted file mode 100644 index fcb672a5926..00000000000 --- a/src/test/java/org/olat/util/xss/client/_ressources/xssClient_iframe.vm +++ /dev/null @@ -1 +0,0 @@ -<iframe></iframe> diff --git a/src/test/java/org/olat/util/xss/client/_ressources/xssClient_jquery.js b/src/test/java/org/olat/util/xss/client/_ressources/xssClient_jquery.js deleted file mode 100644 index 1a334d0373d..00000000000 --- a/src/test/java/org/olat/util/xss/client/_ressources/xssClient_jquery.js +++ /dev/null @@ -1 +0,0 @@ -${"*","XSS"} diff --git a/src/test/java/org/olat/util/xss/client/_ressources/xssClient_script.js b/src/test/java/org/olat/util/xss/client/_ressources/xssClient_script.js deleted file mode 100644 index 888b3aa8181..00000000000 --- a/src/test/java/org/olat/util/xss/client/_ressources/xssClient_script.js +++ /dev/null @@ -1 +0,0 @@ -window.alert("XSS"); diff --git a/src/test/java/org/olat/util/xss/client/_ressources/xssClient_scriptSnippet.vm b/src/test/java/org/olat/util/xss/client/_ressources/xssClient_scriptSnippet.vm deleted file mode 100644 index 0e4f68c120c..00000000000 --- a/src/test/java/org/olat/util/xss/client/_ressources/xssClient_scriptSnippet.vm +++ /dev/null @@ -1 +0,0 @@ -${"script"} diff --git a/src/test/java/org/olat/util/xss/client/_ressources/xssClient_tags.xml b/src/test/java/org/olat/util/xss/client/_ressources/xssClient_tags.xml deleted file mode 100644 index 68030b1d30f..00000000000 --- a/src/test/java/org/olat/util/xss/client/_ressources/xssClient_tags.xml +++ /dev/null @@ -1,79 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<list> - <!-- document structure tags --> - <tag name="html"/> - <tag name="head"/> - <tag name="meta"/> - <tag name="body"> - <attribute name="onload"/> - </tag> - - <!-- formating tags --> - <tag name="h1"/> - <tag name="h2"/> - <tag name="h3"/> - <tag name="h4"/> - <tag name="h5"/> - <tag name="h6"/> - <tag name="p"/> - <tag name="table"> - <attribute name="cellpadding"/> - <attribute name="cellspacing"/> - </tag> - <tag name="thead"/> - <tag name="tr"/> - <tag name="th"/> - <tag name="tbody"/> - <tag name="td"> - <attribute name="align"/> - <attribute name="valign"/> - <attribute name="colspan"/> - <attribute name="rowspan"/> - </tag> - <tag name="col"/> - <tag name="colgroup"/> - <tag name="tfoot"/> - <tag name="div"/> - <tag name="a"> - <attribute name="href"/> - </tag> - <tag name="ol"/> - <tag name="ul"/> - <tag name="li"/> - <tag name="address"/> - <tag name="hr"/> - <tag name="pre"/> - <tag name="code"/> - <tag name="dd"/> - <tag name="dt"/> - <tag name="textarea"/> - - <!-- embedding external --> - <tag name="img"> - <attribute name="src"/> - <attribute nama="alt"/> - </tag> - <tag name="script"/> - <tag name="object"/> - <tag name="embed"/> - <tag name="audio"/> - <tag name="video"/> - - <!-- styling --> - <tag name="i"/> - <tag name="b"/> - <tag name="u"/> - <tag name="s"/> - <tag name="span"/> - <tag name="blockquote"/> - <tag name="br"/> - <tag name="small"/> - <tag name="big"/> - <tag name="sub"/> - <tag name="sup"/> - <tag name="em"/> - <tag name="q"/> - <tag name="label"/> - <tag name="option"/> - <tag name="select"/> -</list> diff --git a/src/test/java/org/olat/util/xss/client/_ressources/xssClient_web.xml b/src/test/java/org/olat/util/xss/client/_ressources/xssClient_web.xml deleted file mode 100644 index 5f4b02444e1..00000000000 --- a/src/test/java/org/olat/util/xss/client/_ressources/xssClient_web.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" - metadata-complete="true"> - - <servlet> - <servlet-name>XssClient</servlet-name> - <servlet-class>org.olat.util.xss.client.XssClient</servlet-class> - <init-param> - <param-name>enabledForExtensions</param-name> - <param-value>true</param-value> - <!-- <description>Sets, whether the servlet supports vendor extensions - for XML-RPC.</description> --> - </init-param> - </servlet> - <servlet-mapping> - <servlet-name>XssClient</servlet-name> - <url-pattern>/xssclient</url-pattern> - </servlet-mapping> - -</web-app> -- GitLab