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

Cannot add Web Content on Windows Environment if StripFilter is enabled

Description

    Description
    Error thrown in stacktrace due to Windows Path parsing when editing Webcontent, makes it unable for the user to access the contextual sidebar at all

    Steps to Reproduce

    1. Compile portal on linux/mac machine
    2. Enable StripFilter in portal-ext.properties
      com.liferay.portal.servlet.filters.strip.StripFilter=true
      
    3. Start Portal on Windows machine
    4. Login to Portal
    5. Create Web Content
    6. Attempt to Edit Web Content Fields

    Expected Result
    All normal Web content fields editable

    Actual Result
    Fields are not editable. Contextual sidebar fails to load due to an error.

    ERROR [http-nio-8080-exec-6][StripFilter:62] java.nio.file.InvalidPathException: Illegal char <:> at index 4: http://localhost:8080/group/guest/~/control_panel/manage
    java.nio.file.InvalidPathException: Illegal char <:> at index 4: http://localhost:8080/group/guest/~/control_panel/manage
            at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
            at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
            at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
            at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
            at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
            at com.google.javascript.jscomp.SourceMapResolver.getRelativePath(SourceMapResolver.java:73)
            at com.google.javascript.jscomp.SourceMapResolver.extractSourceMap(SourceMapResolver.java:53)
            at com.google.javascript.jscomp.JsAst.parse(JsAst.java:168)
            at com.google.javascript.jscomp.JsAst.getAstRoot(JsAst.java:55)
            at com.google.javascript.jscomp.CompilerInput.getAstRoot(CompilerInput.java:134)
            at com.google.javascript.jscomp.Compiler.hoistIfExtern(Compiler.java:2076)
            at com.google.javascript.jscomp.Compiler.hoistExterns(Compiler.java:2062)
            at com.google.javascript.jscomp.Compiler.findDependenciesFromEntryPoints(Compiler.java:1944)
            at com.google.javascript.jscomp.Compiler.parseInputs(Compiler.java:1787)
            at com.google.javascript.jscomp.Compiler.parseForCompilationInternal(Compiler.java:981)
            at com.google.javascript.jscomp.Compiler.access$300(Compiler.java:101)
            at com.google.javascript.jscomp.Compiler$6.call(Compiler.java:963)
            at com.google.javascript.jscomp.Compiler$6.call(Compiler.java:960)
            at com.google.javascript.jscomp.CompilerExecutor.runInCompilerThread(CompilerExecutor.java:128)
            at com.google.javascript.jscomp.Compiler.runInCompilerThread(Compiler.java:861)
            at com.google.javascript.jscomp.Compiler.parseForCompilation(Compiler.java:959)
            at com.google.javascript.jscomp.Compiler.compile(Compiler.java:712)
            at com.google.javascript.jscomp.Compiler.compile(Compiler.java:689)
            at com.frontend.js.minifier.GoogleJavaScriptMinifier.compress(GoogleJavaScriptMinifier.java:68)
            at com.liferay.portal.minifier.MinifierUtil._minifyJavaScript(MinifierUtil.java:109)
            at com.liferay.portal.minifier.MinifierUtil.minifyJavaScript(MinifierUtil.java:47)
            at com.liferay.portal.servlet.filters.strip.StripFilter.processJavaScript(StripFilter.java:526)
            at com.liferay.portal.servlet.filters.strip.StripFilter.strip(StripFilter.java:673)
            at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:384)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
            at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:368)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
            at com.liferay.portal.servlet.filters.password.modified.PasswordModifiedFilter.processFilter(PasswordModifiedFilter.java:62)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
            at com.liferay.portal.servlet.filters.lockout.LockoutFilter.processFilter(LockoutFilter.java:58)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
            at com.liferay.portal.servlet.filters.secure.BaseAuthFilter.processFilter(BaseAuthFilter.java:340)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
            at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:87)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
            at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:264)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
            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:215)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
            at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:250)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
            at com.liferay.portal.monitoring.internal.servlet.filter.MonitoringFilter.processFilter(MonitoringFilter.java:183)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
            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:389)
            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:215)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:175)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:175)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:104)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
            at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)
            at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
            at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
            at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1594)
            at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
            at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
            at java.lang.Thread.run(Thread.java:748)
    

    Reproduced on:
    Tomcat 9.0.33 + SqlServer 2016 + Windows Server 2016 + IE11(not browser specific) + Portal master GIT ID: 9db8f60
    Tomcat 9.0.33 + HSQL + Windows 10 Pro + Chrome 84 + Portal master GIT ID: 5377990fd22f5213298724ae2867455b2c653371
    Tomcat 9.0.33 + HSQL + Windows 10 Pro + Chrome 84 + 7.3 GA4
    Tomcat 9.0.33 + HSQL + Windows 10 Pro + Chrome 84 + 7.3 DXP EP4

    Not Reproducible on:
    Tomcat 9.0.33 + HSQL + Windows 10 Pro + Chrome 84 + 7.2 DXP SP2

    This can be reproduced when accessing the the server from non-Windows machines, The problem occurs server-side.

    Workaround:
    Disable the minifier

    minifier.enabled=false
    

    Attachments

      Activity

        People

          victor.ware Victor Ware
          kyle.miho Kyle Miho
          Kiyoshi Lee Kiyoshi Lee
          Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

            Created:
            Updated:
            Resolved:
            2 years, 16 weeks, 6 days ago

            Packages

              Version Package
              7.3.4 CE GA5
              7.3.5 CE GA6
              7.3.10 DXP GA1
              Master