Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-75606

User should not be able to download a Sharepoint Repository

    Details

      Description

      Steps to reproduce:

      1. Set up new Sharepoint connector
      2. Navigate to DM home
      3. Click actions kebab for Sharepoint Repository

      Expected result:
      The Download menuitem should not appear.

      Actual result:
      The Download menuitem appears. Clicking on it results in portlet errors and a blank screen.

      23:06:03,769 ERROR [http-nio-8080-exec-10][PortletServlet:112] javax.portlet.PortletException: com.liferay.portal.kernel.security.auth.PrincipalException: Unable to get https://liferaycolab.sharepoint.com/_api/web/GetFileByServerRelativeUrl('/Documentos compartidos/Forms/AllItems.aspx')/OpenBinaryStream: 403 Forbidden
      javax.portlet.PortletException: com.liferay.portal.kernel.security.auth.PrincipalException: Unable to get https://liferaycolab.sharepoint.com/_api/web/GetFileByServerRelativeUrl('/Documentos compartidos/Forms/AllItems.aspx')/OpenBinaryStream: 403 Forbidden
              at com.liferay.document.library.web.internal.portlet.action.EditFolderMVCResourceCommand.serveResource(EditFolderMVCResourceCommand.java:80)
              at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.callResourceMethod(MVCPortlet.java:442)
              at com.liferay.portal.kernel.portlet.LiferayPortlet.serveResource(LiferayPortlet.java:141)
              at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.serveResource(MVCPortlet.java:342)
              at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:122)
              at com.liferay.portlet.ScriptDataPortletFilter.doFilter(ScriptDataPortletFilter.java:85)
              at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:116)
              at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:71)
              at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:108)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
              at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
              at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:62)
              at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:117)
              at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.forward(RequestDispatcherAdaptor.java:40)
              at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:532)
              at com.liferay.portlet.InvokerPortletImpl.invokeResource(InvokerPortletImpl.java:635)
              at com.liferay.portlet.InvokerPortletImpl.serveResource(InvokerPortletImpl.java:471)
              at com.liferay.portal.monitoring.internal.portlet.MonitoringInvokerPortlet.serveResource(MonitoringInvokerPortlet.java:303)
              at com.liferay.portlet.PortletContainerImpl._serveResource(PortletContainerImpl.java:841)
              at com.liferay.portlet.PortletContainerImpl.serveResource(PortletContainerImpl.java:177)
              at com.liferay.portlet.SecurityPortletContainerWrapper.serveResource(SecurityPortletContainerWrapper.java:166)
              at com.liferay.portlet.RestrictPortletContainerWrapper.serveResource(RestrictPortletContainerWrapper.java:173)
              at com.liferay.portal.kernel.portlet.PortletContainerUtil.serveResource(PortletContainerUtil.java:169)
              at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:303)
              at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:159)
              at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
              at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
              at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:170)
              at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
              at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
              at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:607)
              at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:584)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:119)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
              at com.liferay.portal.servlet.filters.uploadservletrequest.UploadServletRequestFilter.processFilter(UploadServletRequestFilter.java:93)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
              at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:337)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
              at com.liferay.portal.servlet.filters.jsoncontenttype.JSONContentTypeFilter.processFilter(JSONContentTypeFilter.java:42)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
              at com.liferay.portal.monitoring.internal.servlet.filter.MonitoringFilter.processFilter(MonitoringFilter.java:181)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:100)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:720)
              at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:466)
              at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:391)
              at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:318)
              at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:153)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:119)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
              at com.liferay.frontend.compatibility.ie.servlet.filter.IEMimeTypeCompatibilityFilter.processFilter(IEMimeTypeCompatibilityFilter.java:48)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
              at com.liferay.portal.servlet.filters.uploadservletrequest.UploadServletRequestFilter.processFilter(UploadServletRequestFilter.java:93)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
              at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:125)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
              at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:337)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
              at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:364)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
              at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:86)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
              at com.liferay.portal.servlet.filters.jsoncontenttype.JSONContentTypeFilter.processFilter(JSONContentTypeFilter.java:42)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
              at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:261)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
              at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:88)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
              at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:270)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
              at com.liferay.portal.monitoring.internal.servlet.filter.MonitoringFilter.processFilter(MonitoringFilter.java:181)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
              at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
              at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
              at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
              at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)
              at com.liferay.portal.servlet.filters.urlrewrite.UrlRewriteFilter.processFilter(UrlRewriteFilter.java:65)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:100)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
              at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
              at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
              at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
              at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
              at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: com.liferay.portal.kernel.security.auth.PrincipalException: Unable to get https://liferaycolab.sharepoint.com/_api/web/GetFileByServerRelativeUrl('/Documentos compartidos/Forms/AllItems.aspx')/OpenBinaryStream: 403 Forbidden
              at com.liferay.sharepoint.repository.internal.document.library.repository.external.SharepointExtRepository._getInputStream(SharepointExtRepository.java:730)
              at com.liferay.sharepoint.repository.internal.document.library.repository.external.SharepointExtRepository._getInputStream(SharepointExtRepository.java:716)
              at com.liferay.sharepoint.repository.internal.document.library.repository.external.SharepointExtRepository.getContentStream(SharepointExtRepository.java:240)
              at com.liferay.sharepoint.repository.internal.document.library.repository.external.SharepointCachingExtRepository.getContentStream(SharepointCachingExtRepository.java:215)
              at com.liferay.document.library.repository.external.ExtRepositoryAdapter.getContentStream(ExtRepositoryAdapter.java:275)
              at com.liferay.document.library.repository.external.model.ExtRepositoryFileEntryAdapter.getContentStream(ExtRepositoryFileEntryAdapter.java:77)
              at com.liferay.document.library.web.internal.portlet.action.EditFolderMVCResourceCommand.zipFolder(EditFolderMVCResourceCommand.java:161)
              at com.liferay.document.library.web.internal.portlet.action.EditFolderMVCResourceCommand.zipFolder(EditFolderMVCResourceCommand.java:149)
              at com.liferay.document.library.web.internal.portlet.action.EditFolderMVCResourceCommand.downloadFolder(EditFolderMVCResourceCommand.java:110)
              at com.liferay.document.library.web.internal.portlet.action.EditFolderMVCResourceCommand.serveResource(EditFolderMVCResourceCommand.java:75)
              ... 166 more
      23:06:40,769 INFO  [elasticsearch[Green Goblin][clusterService#updateTask][T#1]][metadata:317] [Green Goblin] [liferay-20116] update_mapping [LiferayDocumentType]
      

      Reproduced on:
      Tomcat 8.0.32 + MySQL 5.6
      Portal 7.0.x-private GIT ID: e1c415b867bd0315a9f02d98eb6e8e4aa809560f

        Attachments

        1. download.PNG
          download.PNG
          185 kB
        2. LPS-75606 FIxed (1).png
          LPS-75606 FIxed (1).png
          104 kB
        3. LPS-75606 FIxed (2).png
          LPS-75606 FIxed (2).png
          174 kB

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  1 year, 44 weeks, 3 days ago

                  Packages

                  Version Package
                  7.0.0 DXP FP33
                  7.0.0 DXP FP35
                  7.0.0 DXP SP7
                  7.0.5 CE GA6
                  7.0.X
                  7.1.0 M1
                  7.1.X
                  Master