From 93aa15194f6e6880bfd09864b59d8db2214153a7 Mon Sep 17 00:00:00 2001 From: jdotcms Date: Thu, 26 Sep 2019 16:23:38 -0600 Subject: [PATCH 01/24] Release 5.2 --- .../plugin/aop/rest/MyContentResource.java | 53 ++++++------------- .../osgi/webinterceptors/FilteredCommand.java | 32 +++++++++++ ...authorizedConfigurableRedirectCommand.java | 37 +++++++++++++ 3 files changed, 86 insertions(+), 36 deletions(-) create mode 100644 OSGi/com.dotcms.webinterceptor2/src/main/java/com/dotmarketing/osgi/webinterceptors/FilteredCommand.java create mode 100644 OSGi/com.dotcms.webinterceptor2/src/main/java/com/dotmarketing/osgi/webinterceptors/UnauthorizedConfigurableRedirectCommand.java diff --git a/OSGi/com.dotcms.aop/src/main/java/com/dotcms/plugin/aop/rest/MyContentResource.java b/OSGi/com.dotcms.aop/src/main/java/com/dotcms/plugin/aop/rest/MyContentResource.java index ee34d4ca..30d199df 100644 --- a/OSGi/com.dotcms.aop/src/main/java/com/dotcms/plugin/aop/rest/MyContentResource.java +++ b/OSGi/com.dotcms.aop/src/main/java/com/dotcms/plugin/aop/rest/MyContentResource.java @@ -1,24 +1,25 @@ package com.dotcms.plugin.aop.rest; -import com.dotcms.repackage.javax.ws.rs.*; -import com.dotcms.repackage.javax.ws.rs.core.Context; -import com.dotcms.repackage.javax.ws.rs.core.MediaType; -import com.dotcms.repackage.javax.ws.rs.core.Response; -import com.dotcms.repackage.org.glassfish.jersey.server.JSONP; import com.dotcms.rest.InitDataObject; import com.dotcms.rest.ResponseEntityView; import com.dotcms.rest.WebResource; import com.dotcms.rest.annotation.NoCache; import com.dotcms.rest.exception.mapper.ExceptionMapperUtil; import com.dotcms.util.LogTime; -import com.dotcms.vanityurl.business.VanityUrlAPI; import com.dotmarketing.business.APILocator; import com.dotmarketing.exception.DotDataException; +import com.dotmarketing.exception.DotSecurityException; import com.dotmarketing.portlets.contentlet.business.ContentletAPI; import com.dotmarketing.portlets.contentlet.model.Contentlet; import com.liferay.portal.model.User; +import org.glassfish.jersey.server.JSONP; import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; @Path("/v1/custom/content") public class MyContentResource { @@ -26,34 +27,23 @@ public class MyContentResource { private final WebResource webResource = new WebResource(); private final MyContentService contentService = new MyContentService(); private final ContentletAPI contentletAPI = APILocator.getContentletAPI(); - private final VanityUrlAPI vanityUrlAPI = APILocator.getVanityUrlAPI(); @GET @Path("/inode/{inode}") @Produces(MediaType.APPLICATION_JSON) @LogTime public Response getContentByInode(@Context final HttpServletRequest request, - @PathParam("inode") final String inode) { + @Context final HttpServletResponse response, + @PathParam("inode") final String inode) throws DotSecurityException, DotDataException { final InitDataObject initData = this.webResource.init - (null, true, request, false, null); + (request, response, false); final User user = initData.getUser(); - Contentlet contentlet = null; - Response response = null; - - try { - - contentlet = this.contentService.hydrateContentLet + final Contentlet contentlet = this.contentService.hydrateContentLet (this.contentletAPI.find(inode, user, true)); - response = Response.ok(new ResponseEntityView (contentlet)).build(); - } catch (Exception e) { + return Response.ok(new ResponseEntityView (contentlet)).build(); - response = ExceptionMapperUtil.createResponse - (e, Response.Status.INTERNAL_SERVER_ERROR); - } - - return response; } @Path("/lastMonth") @@ -61,21 +51,12 @@ public Response getContentByInode(@Context final HttpServletRequest request, @JSONP @NoCache @Produces({MediaType.APPLICATION_JSON, "application/javascript"}) - public Response deleteLastMonthContent(@Context final HttpServletRequest request) { + public Response deleteLastMonthContent(@Context final HttpServletRequest request, + @Context final HttpServletResponse response) throws DotDataException { - final InitDataObject initData = this.webResource.init - (null, true, request, true, null); - Response response = null; - - try { - - response = Response.ok(new ResponseEntityView + this.webResource.init + (request, response, false); + return Response.ok(new ResponseEntityView (this.contentService.deleteLastMonthContent())).build(); - } catch (DotDataException e) { - response = ExceptionMapperUtil.createResponse - (e, Response.Status.INTERNAL_SERVER_ERROR); - } - - return response; } } \ No newline at end of file diff --git a/OSGi/com.dotcms.webinterceptor2/src/main/java/com/dotmarketing/osgi/webinterceptors/FilteredCommand.java b/OSGi/com.dotcms.webinterceptor2/src/main/java/com/dotmarketing/osgi/webinterceptors/FilteredCommand.java new file mode 100644 index 00000000..6279ff28 --- /dev/null +++ b/OSGi/com.dotcms.webinterceptor2/src/main/java/com/dotmarketing/osgi/webinterceptors/FilteredCommand.java @@ -0,0 +1,32 @@ +package com.dotmarketing.osgi.webinterceptors; + +import com.dotmarketing.beans.Host; +import com.dotmarketing.portlets.languagesmanager.model.Language; +import com.liferay.portal.model.User; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * Redirect command, handle and does the redirect if needed (return true to avoid the request chain) + */ +@FunctionalInterface +public interface RedirectCommand { + + /** + * Tries a redirect + * @param request + * @param response + * @param language + * @param host + * @param user + * @param + * @return boolean true if the redirect happens + */ + boolean tryRedirect (final HttpServletRequest request, + final HttpServletResponse response, + final Language language, + final Host host, + final User user, + final String uri); +} diff --git a/OSGi/com.dotcms.webinterceptor2/src/main/java/com/dotmarketing/osgi/webinterceptors/UnauthorizedConfigurableRedirectCommand.java b/OSGi/com.dotcms.webinterceptor2/src/main/java/com/dotmarketing/osgi/webinterceptors/UnauthorizedConfigurableRedirectCommand.java new file mode 100644 index 00000000..3233950f --- /dev/null +++ b/OSGi/com.dotcms.webinterceptor2/src/main/java/com/dotmarketing/osgi/webinterceptors/UnauthorizedConfigurableRedirectCommand.java @@ -0,0 +1,37 @@ +package com.dotmarketing.osgi.webinterceptors; + +import com.dotmarketing.beans.Host; +import com.dotmarketing.portlets.languagesmanager.model.Language; +import com.dotmarketing.util.Config; +import com.dotmarketing.util.UtilMethods; +import com.liferay.portal.model.User; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +public class ConfigurableRedirectCommand implements FilteredCommand { + + + @Override + public boolean tryRedirect(final HttpServletRequest request, + final HttpServletResponse response, + final Language language, + final Host host, + final User user, + final String uri) { + + final String[] filteredUrls = Config.getStringArrayProperty("dotcms.filtered.urls"); + + if (UtilMethods.isSet(filteredUrls)) { + for (final String filteredUrl : filteredUrls) { + + if (uri.contains(filteredUrl)) { + + return true; + } + } + } + + return false; + } +} From 055c54f2c66c4c807045773d82e21302cc3f7e9d Mon Sep 17 00:00:00 2001 From: jdotcms Date: Thu, 26 Sep 2019 17:57:41 -0600 Subject: [PATCH 02/24] Fixing imports --- .../dotcms/plugin/rest/ExampleResource.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/OSGi/com.dotcms.rest/src/main/java/com/dotcms/plugin/rest/ExampleResource.java b/OSGi/com.dotcms.rest/src/main/java/com/dotcms/plugin/rest/ExampleResource.java index 88f800d3..6ccafd6b 100644 --- a/OSGi/com.dotcms.rest/src/main/java/com/dotcms/plugin/rest/ExampleResource.java +++ b/OSGi/com.dotcms.rest/src/main/java/com/dotcms/plugin/rest/ExampleResource.java @@ -4,15 +4,15 @@ import javax.servlet.http.HttpServletRequest; -import com.dotcms.repackage.javax.ws.rs.GET; -import com.dotcms.repackage.javax.ws.rs.POST; -import com.dotcms.repackage.javax.ws.rs.PUT; -import com.dotcms.repackage.javax.ws.rs.Path; -import com.dotcms.repackage.javax.ws.rs.PathParam; -import com.dotcms.repackage.javax.ws.rs.core.CacheControl; -import com.dotcms.repackage.javax.ws.rs.core.Context; -import com.dotcms.repackage.javax.ws.rs.core.Response; -import com.dotcms.repackage.javax.ws.rs.core.Response.ResponseBuilder; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.core.CacheControl; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.Response.ResponseBuilder; import com.dotcms.rest.InitDataObject; import com.dotcms.rest.WebResource; import com.dotmarketing.business.DotStateException; From 9b309629834a9a36b11edd9f787fc0956891977c Mon Sep 17 00:00:00 2001 From: jdotcms Date: Fri, 27 Sep 2019 09:31:44 -0600 Subject: [PATCH 03/24] 3rd updated to 5.2.0 --- OSGi/com.dotcms.3rd.party/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSGi/com.dotcms.3rd.party/build.gradle b/OSGi/com.dotcms.3rd.party/build.gradle index 83f1ab1b..11f07911 100644 --- a/OSGi/com.dotcms.3rd.party/build.gradle +++ b/OSGi/com.dotcms.3rd.party/build.gradle @@ -11,7 +11,7 @@ repositories { dependencies { compile fileTree(dir: 'src/main/resources/libs', include: '*.jar') - compile('com.dotcms:dotcms:5.1.6') { transitive = true } + compile('com.dotcms:dotcms:5.2.0') { transitive = true } } import java.util.jar.* From a181613862ce9939a079b5f16134908d934e0e25 Mon Sep 17 00:00:00 2001 From: jdotcms Date: Fri, 27 Sep 2019 09:39:43 -0600 Subject: [PATCH 04/24] aop upgraded 5.2.0 --- OSGi/com.dotcms.actionlet/build.gradle | 2 +- OSGi/com.dotcms.aop/build.gradle | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/OSGi/com.dotcms.actionlet/build.gradle b/OSGi/com.dotcms.actionlet/build.gradle index 04eb8a51..4b6a5660 100644 --- a/OSGi/com.dotcms.actionlet/build.gradle +++ b/OSGi/com.dotcms.actionlet/build.gradle @@ -10,7 +10,7 @@ repositories { } dependencies { - compile('com.dotcms:dotcms:5.1.6') { transitive = true } + compile('com.dotcms:dotcms:5.2.0') { transitive = true } } import java.util.jar.* diff --git a/OSGi/com.dotcms.aop/build.gradle b/OSGi/com.dotcms.aop/build.gradle index 6a6c2363..5cd550f4 100644 --- a/OSGi/com.dotcms.aop/build.gradle +++ b/OSGi/com.dotcms.aop/build.gradle @@ -1,3 +1,5 @@ +import java.util.jar.JarFile + plugins { id 'biz.aQute.bnd.builder' version '3.3.0' } @@ -72,10 +74,11 @@ dependencies { ajc "org.aspectj:aspectjtools:1.8.10" providedCompile "org.aspectj:aspectjrt:1.8.10" - providedCompile (group: 'com.dotcms', name: 'dotcms', version: '5.1.6'){ + providedCompile (group: 'com.dotcms', name: 'dotcms', version: '5.2.0'){ transitive = true } - aspects (group: 'com.dotcms', name: 'dotcms', version: '5.1.6') + aspects (group: 'com.dotcms', name: 'dotcms', version: '5.2.0') + providedCompile "javax.servlet:javax.servlet-api:3.1.0" } From 0f23def574a4b2e8121b88a654bdf709f1de895c Mon Sep 17 00:00:00 2001 From: jdotcms Date: Fri, 27 Sep 2019 09:42:07 -0600 Subject: [PATCH 05/24] spring upgraded 5.2.0 --- OSGi/com.dotcms.custom.spring/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSGi/com.dotcms.custom.spring/build.gradle b/OSGi/com.dotcms.custom.spring/build.gradle index 7be66765..dd35860e 100644 --- a/OSGi/com.dotcms.custom.spring/build.gradle +++ b/OSGi/com.dotcms.custom.spring/build.gradle @@ -14,7 +14,7 @@ configurations { } dependencies { - compile('com.dotcms:dotcms:5.1.6') { transitive = true } + compile('com.dotcms:dotcms:5.2.0') { transitive = true } //Resolve dependencies. These jars can be downloaded from our Maven Repo //In case you want to create a Controller using other Spring version, //just change the version Attribute. From a1db790efd255ebccba57c04f5a8a96acf9cc4ca Mon Sep 17 00:00:00 2001 From: jdotcms Date: Fri, 27 Sep 2019 09:45:10 -0600 Subject: [PATCH 06/24] skeleton upgrade 5.2.0 --- OSGi/com.dotcms.dynamic.skeleton/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSGi/com.dotcms.dynamic.skeleton/build.gradle b/OSGi/com.dotcms.dynamic.skeleton/build.gradle index 55db3c45..21231bd5 100644 --- a/OSGi/com.dotcms.dynamic.skeleton/build.gradle +++ b/OSGi/com.dotcms.dynamic.skeleton/build.gradle @@ -23,7 +23,7 @@ dependencies { // include all jars within the resource libs compile fileTree(dir: 'src/main/resources/libs', include: '*.jar') // Using all jar from artifactory part of the dotcms group - compile('com.dotcms:dotcms:5.1.6') { transitive = true } + compile('com.dotcms:dotcms:5.2.0') { transitive = true } } import java.util.jar.* From f0e0b39b8882d4d7bd3ef30365690a191d3fb78c Mon Sep 17 00:00:00 2001 From: jdotcms Date: Fri, 27 Sep 2019 09:46:25 -0600 Subject: [PATCH 07/24] fixasset upgraded 5.2.0 --- OSGi/com.dotcms.fixasset/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSGi/com.dotcms.fixasset/build.gradle b/OSGi/com.dotcms.fixasset/build.gradle index 0a4c83ee..b3ab8921 100644 --- a/OSGi/com.dotcms.fixasset/build.gradle +++ b/OSGi/com.dotcms.fixasset/build.gradle @@ -10,7 +10,7 @@ repositories { } dependencies { - compile('com.dotcms:dotcms:5.1.6') { transitive = true } + compile('com.dotcms:dotcms:5.2.0') { transitive = true } } import java.util.jar.* From 25713835c072b3dfdec38fada42aef7c289b9e8e Mon Sep 17 00:00:00 2001 From: jdotcms Date: Fri, 27 Sep 2019 09:49:53 -0600 Subject: [PATCH 08/24] hooks upgraded to 5.2.0 --- OSGi/com.dotcms.hooks/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSGi/com.dotcms.hooks/build.gradle b/OSGi/com.dotcms.hooks/build.gradle index 7b0a8f5a..3737f888 100644 --- a/OSGi/com.dotcms.hooks/build.gradle +++ b/OSGi/com.dotcms.hooks/build.gradle @@ -10,7 +10,7 @@ repositories { } dependencies { - compile('com.dotcms:dotcms:5.1.6') { transitive = true } + compile('com.dotcms:dotcms:5.2.0') { transitive = true } } import java.util.jar.* From 6692478cfa93a5c9175882a9a038dfbe5e488298 Mon Sep 17 00:00:00 2001 From: jdotcms Date: Fri, 27 Sep 2019 09:52:55 -0600 Subject: [PATCH 09/24] job upgraded 5.2.0 --- OSGi/com.dotcms.job/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSGi/com.dotcms.job/build.gradle b/OSGi/com.dotcms.job/build.gradle index 9ef0c327..f1673f67 100644 --- a/OSGi/com.dotcms.job/build.gradle +++ b/OSGi/com.dotcms.job/build.gradle @@ -10,7 +10,7 @@ repositories { } dependencies { - compile('com.dotcms:dotcms:5.1.6') { transitive = true } + compile('com.dotcms:dotcms:5.2.0') { transitive = true } } import java.util.jar.* From 09c8c97c736117f6043d94dcb81678d8113da88f Mon Sep 17 00:00:00 2001 From: jdotcms Date: Fri, 27 Sep 2019 09:56:02 -0600 Subject: [PATCH 10/24] override upgraded 5.2.0 --- OSGi/com.dotcms.override/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSGi/com.dotcms.override/build.gradle b/OSGi/com.dotcms.override/build.gradle index af500133..f49fd574 100644 --- a/OSGi/com.dotcms.override/build.gradle +++ b/OSGi/com.dotcms.override/build.gradle @@ -10,7 +10,7 @@ repositories { } dependencies { - compile('com.dotcms:dotcms:5.1.6') { transitive = true } + compile('com.dotcms:dotcms:5.2.0') { transitive = true } } import java.util.jar.* From 6406e325fcf2f27e86641fdea535338c54f764f4 Mon Sep 17 00:00:00 2001 From: jdotcms Date: Fri, 27 Sep 2019 10:04:59 -0600 Subject: [PATCH 11/24] rest upgraded 5.2.0 --- OSGi/com.dotcms.rest/build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OSGi/com.dotcms.rest/build.gradle b/OSGi/com.dotcms.rest/build.gradle index 05799ba8..fadf6d59 100644 --- a/OSGi/com.dotcms.rest/build.gradle +++ b/OSGi/com.dotcms.rest/build.gradle @@ -10,7 +10,8 @@ repositories { } dependencies { - compile('com.dotcms:dotcms:5.1.6') { transitive = true } + //compile('com.dotcms:dotcms:5.1.6') { transitive = true } + compile fileTree('/Users/jsanca/gitsources/dotcms-master/tomcat8/webapps/ROOT/WEB-INF/lib') } import java.util.jar.* From e16c8a34faef00658e4de8ca64e5adfaebf14edc Mon Sep 17 00:00:00 2001 From: jdotcms Date: Fri, 27 Sep 2019 10:06:31 -0600 Subject: [PATCH 12/24] pp listener upgraded 5.2.0 --- OSGi/com.dotcms.pushpublish.listener/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSGi/com.dotcms.pushpublish.listener/build.gradle b/OSGi/com.dotcms.pushpublish.listener/build.gradle index 406ed390..3588a41b 100644 --- a/OSGi/com.dotcms.pushpublish.listener/build.gradle +++ b/OSGi/com.dotcms.pushpublish.listener/build.gradle @@ -10,7 +10,7 @@ repositories { } dependencies { - compile('com.dotcms:dotcms:5.1.6') { transitive = true } + compile('com.dotcms:dotcms:5.2.0') { transitive = true } } import java.util.jar.* From 57eee8047488788e97acd1abf85f8e24906f8c3d Mon Sep 17 00:00:00 2001 From: jdotcms Date: Fri, 27 Sep 2019 10:09:30 -0600 Subject: [PATCH 13/24] rest upgraded 5.2.0 --- OSGi/com.dotcms.rest/build.gradle | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OSGi/com.dotcms.rest/build.gradle b/OSGi/com.dotcms.rest/build.gradle index fadf6d59..adfa0ae2 100644 --- a/OSGi/com.dotcms.rest/build.gradle +++ b/OSGi/com.dotcms.rest/build.gradle @@ -10,8 +10,7 @@ repositories { } dependencies { - //compile('com.dotcms:dotcms:5.1.6') { transitive = true } - compile fileTree('/Users/jsanca/gitsources/dotcms-master/tomcat8/webapps/ROOT/WEB-INF/lib') + compile('com.dotcms:dotcms:5.2.0') { transitive = true } } import java.util.jar.* From 4079124acddb762df4190a04a08e1aeb48f4b172 Mon Sep 17 00:00:00 2001 From: jdotcms Date: Fri, 27 Sep 2019 10:22:53 -0600 Subject: [PATCH 14/24] velocity script upgraded 5.2.0 --- .../build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSGi/com.dotcms.ruleengine.velocityscriptingactionlet/build.gradle b/OSGi/com.dotcms.ruleengine.velocityscriptingactionlet/build.gradle index f32ada36..d6b4f9ec 100644 --- a/OSGi/com.dotcms.ruleengine.velocityscriptingactionlet/build.gradle +++ b/OSGi/com.dotcms.ruleengine.velocityscriptingactionlet/build.gradle @@ -15,7 +15,7 @@ configurations { } dependencies { - compile('com.dotcms:dotcms:5.1.6') { transitive = true } + compile('com.dotcms:dotcms:5.2.0') { transitive = true } testCompile 'org.mockito:mockito-core:2.0.31-beta' testCompile 'org.hamcrest:hamcrest-all:1.3' From cefe62cbc4498844d290a14edf36f826e30c5a97 Mon Sep 17 00:00:00 2001 From: jdotcms Date: Fri, 27 Sep 2019 10:25:21 -0600 Subject: [PATCH 15/24] visitor ip conditionlet upgraded --- OSGi/com.dotcms.ruleengine.visitoripconditionlet/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSGi/com.dotcms.ruleengine.visitoripconditionlet/build.gradle b/OSGi/com.dotcms.ruleengine.visitoripconditionlet/build.gradle index 329bb852..bb166cd0 100644 --- a/OSGi/com.dotcms.ruleengine.visitoripconditionlet/build.gradle +++ b/OSGi/com.dotcms.ruleengine.visitoripconditionlet/build.gradle @@ -15,7 +15,7 @@ configurations { } dependencies { - compile('com.dotcms:dotcms:5.1.6') { transitive = true } + compile('com.dotcms:dotcms:5.2.0') { transitive = true } testCompile 'org.mockito:mockito-core:2.0.31-beta' testCompile 'org.hamcrest:hamcrest-all:1.3' From babda251f41edcbb4b73bbc1f21ec07d3638faa3 Mon Sep 17 00:00:00 2001 From: jdotcms Date: Fri, 27 Sep 2019 10:40:47 -0600 Subject: [PATCH 16/24] servlet upgraded 5.2.0 --- OSGi/com.dotcms.servlet/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSGi/com.dotcms.servlet/build.gradle b/OSGi/com.dotcms.servlet/build.gradle index f88efcac..13ada63e 100644 --- a/OSGi/com.dotcms.servlet/build.gradle +++ b/OSGi/com.dotcms.servlet/build.gradle @@ -11,7 +11,7 @@ repositories { dependencies { compile fileTree(dir: '../com.dotcms.simpleService/build/libs/', include: '*.jar')//As this example depends on the com.dotcms.simpleService example - compile('com.dotcms:dotcms:5.1.6') { transitive = true } + compile('com.dotcms:dotcms:5.2.0') { transitive = true } } import java.util.jar.* From 4afcc7f6fbca18ae3afbd7f00acf44f7ad327fc4 Mon Sep 17 00:00:00 2001 From: jdotcms Date: Fri, 27 Sep 2019 10:44:48 -0600 Subject: [PATCH 17/24] simple service upgraded 5.2.0 --- OSGi/com.dotcms.simpleService/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSGi/com.dotcms.simpleService/build.gradle b/OSGi/com.dotcms.simpleService/build.gradle index df8c048a..46f35c8a 100644 --- a/OSGi/com.dotcms.simpleService/build.gradle +++ b/OSGi/com.dotcms.simpleService/build.gradle @@ -10,7 +10,7 @@ repositories { } dependencies { - compile('com.dotcms:dotcms:5.1.6') { transitive = true } + compile('com.dotcms:dotcms:5.2.0') { transitive = true } } import java.util.jar.* From f1647a044eba2563143aebd0dafc758347a4fd83 Mon Sep 17 00:00:00 2001 From: jdotcms Date: Fri, 27 Sep 2019 10:47:55 -0600 Subject: [PATCH 18/24] spring upgraded 5.2.0 --- OSGi/com.dotcms.spring/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSGi/com.dotcms.spring/build.gradle b/OSGi/com.dotcms.spring/build.gradle index 66aa00d7..34e0e481 100644 --- a/OSGi/com.dotcms.spring/build.gradle +++ b/OSGi/com.dotcms.spring/build.gradle @@ -10,7 +10,7 @@ repositories { } dependencies { - compile('com.dotcms:dotcms:5.1.6') { transitive = true } + compile('com.dotcms:dotcms:5.2.0') { transitive = true } } import java.util.jar.* From 4fe9716f36405523c517b80e3dae66ae02bfc7cd Mon Sep 17 00:00:00 2001 From: jdotcms Date: Fri, 27 Sep 2019 10:53:59 -0600 Subject: [PATCH 19/24] staticpublish listener upgraded 5.2 --- OSGi/com.dotcms.staticpublish.listener/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSGi/com.dotcms.staticpublish.listener/build.gradle b/OSGi/com.dotcms.staticpublish.listener/build.gradle index c36d0007..62fa8fc7 100644 --- a/OSGi/com.dotcms.staticpublish.listener/build.gradle +++ b/OSGi/com.dotcms.staticpublish.listener/build.gradle @@ -14,7 +14,7 @@ configurations { } dependencies { - compile('com.dotcms:dotcms:5.1.6') { transitive = true } + compile('com.dotcms:dotcms:5.2.0') { transitive = true } compileOnly('com.hierynomus:sshj:0.23.0'){ exclude group: 'org.bouncycastle' //Why we exlude? See README's important notes. From 4d80244fad642b49c84ec23a6117dba8558dd7b8 Mon Sep 17 00:00:00 2001 From: jdotcms Date: Fri, 27 Sep 2019 10:56:14 -0600 Subject: [PATCH 20/24] tuckey upgraded 5.2 --- OSGi/com.dotcms.tuckey/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSGi/com.dotcms.tuckey/build.gradle b/OSGi/com.dotcms.tuckey/build.gradle index fae5b400..84bbe2e1 100644 --- a/OSGi/com.dotcms.tuckey/build.gradle +++ b/OSGi/com.dotcms.tuckey/build.gradle @@ -10,7 +10,7 @@ repositories { } dependencies { - compile('com.dotcms:dotcms:5.1.6') { transitive = true } + compile('com.dotcms:dotcms:5.2.0') { transitive = true } } import java.util.jar.* From acf1c76f273bbe7edb7755983a2771eaeb3e738b Mon Sep 17 00:00:00 2001 From: jdotcms Date: Fri, 27 Sep 2019 10:57:48 -0600 Subject: [PATCH 21/24] viewtool upgraded 5.2.0 --- OSGi/com.dotcms.viewtool/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSGi/com.dotcms.viewtool/build.gradle b/OSGi/com.dotcms.viewtool/build.gradle index a8efa879..153b1e00 100644 --- a/OSGi/com.dotcms.viewtool/build.gradle +++ b/OSGi/com.dotcms.viewtool/build.gradle @@ -10,7 +10,7 @@ repositories { } dependencies { - compile('com.dotcms:dotcms:5.1.6') { transitive = true } + compile('com.dotcms:dotcms:5.2.0') { transitive = true } } import java.util.jar.* From 50d843e62f58eadfd929a64b21a692a5e50408c6 Mon Sep 17 00:00:00 2001 From: jdotcms Date: Fri, 27 Sep 2019 11:00:46 -0600 Subject: [PATCH 22/24] webinterceptor upgraded 5.2.0 --- OSGi/com.dotcms.webinterceptor/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSGi/com.dotcms.webinterceptor/build.gradle b/OSGi/com.dotcms.webinterceptor/build.gradle index b376c0ba..f141e5f0 100644 --- a/OSGi/com.dotcms.webinterceptor/build.gradle +++ b/OSGi/com.dotcms.webinterceptor/build.gradle @@ -10,7 +10,7 @@ repositories { } dependencies { - compile('com.dotcms:dotcms:5.1.6') { transitive = true } + compile('com.dotcms:dotcms:5.2.0') { transitive = true } } import java.util.jar.* From d42a9d375b100dc85f877a4fc21102098c649d25 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Fri, 27 Sep 2019 11:03:32 -0600 Subject: [PATCH 23/24] Delete FilteredCommand.java --- .../osgi/webinterceptors/FilteredCommand.java | 32 ------------------- 1 file changed, 32 deletions(-) delete mode 100644 OSGi/com.dotcms.webinterceptor2/src/main/java/com/dotmarketing/osgi/webinterceptors/FilteredCommand.java diff --git a/OSGi/com.dotcms.webinterceptor2/src/main/java/com/dotmarketing/osgi/webinterceptors/FilteredCommand.java b/OSGi/com.dotcms.webinterceptor2/src/main/java/com/dotmarketing/osgi/webinterceptors/FilteredCommand.java deleted file mode 100644 index 6279ff28..00000000 --- a/OSGi/com.dotcms.webinterceptor2/src/main/java/com/dotmarketing/osgi/webinterceptors/FilteredCommand.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.dotmarketing.osgi.webinterceptors; - -import com.dotmarketing.beans.Host; -import com.dotmarketing.portlets.languagesmanager.model.Language; -import com.liferay.portal.model.User; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * Redirect command, handle and does the redirect if needed (return true to avoid the request chain) - */ -@FunctionalInterface -public interface RedirectCommand { - - /** - * Tries a redirect - * @param request - * @param response - * @param language - * @param host - * @param user - * @param - * @return boolean true if the redirect happens - */ - boolean tryRedirect (final HttpServletRequest request, - final HttpServletResponse response, - final Language language, - final Host host, - final User user, - final String uri); -} From 106901f96339e2ae11a68c64878c5c58ba9a4690 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Fri, 27 Sep 2019 11:03:43 -0600 Subject: [PATCH 24/24] Delete UnauthorizedConfigurableRedirectCommand.java --- ...authorizedConfigurableRedirectCommand.java | 37 ------------------- 1 file changed, 37 deletions(-) delete mode 100644 OSGi/com.dotcms.webinterceptor2/src/main/java/com/dotmarketing/osgi/webinterceptors/UnauthorizedConfigurableRedirectCommand.java diff --git a/OSGi/com.dotcms.webinterceptor2/src/main/java/com/dotmarketing/osgi/webinterceptors/UnauthorizedConfigurableRedirectCommand.java b/OSGi/com.dotcms.webinterceptor2/src/main/java/com/dotmarketing/osgi/webinterceptors/UnauthorizedConfigurableRedirectCommand.java deleted file mode 100644 index 3233950f..00000000 --- a/OSGi/com.dotcms.webinterceptor2/src/main/java/com/dotmarketing/osgi/webinterceptors/UnauthorizedConfigurableRedirectCommand.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.dotmarketing.osgi.webinterceptors; - -import com.dotmarketing.beans.Host; -import com.dotmarketing.portlets.languagesmanager.model.Language; -import com.dotmarketing.util.Config; -import com.dotmarketing.util.UtilMethods; -import com.liferay.portal.model.User; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -public class ConfigurableRedirectCommand implements FilteredCommand { - - - @Override - public boolean tryRedirect(final HttpServletRequest request, - final HttpServletResponse response, - final Language language, - final Host host, - final User user, - final String uri) { - - final String[] filteredUrls = Config.getStringArrayProperty("dotcms.filtered.urls"); - - if (UtilMethods.isSet(filteredUrls)) { - for (final String filteredUrl : filteredUrls) { - - if (uri.contains(filteredUrl)) { - - return true; - } - } - } - - return false; - } -}