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

upload ico file as image and it will cause page temporarily unavailable.

    Details

      Description

      Summary:
      The issue only occured in ee-6.2.x. From LPS-40099 started, 6.2.x and master used different image decode(6.2.x used jai-codec and master used jdk api), there are a lots of fix only exists on master after LPS-40099.

      Reproduction Steps:
      1) Start the server.
      2) Navigate to Site(Liferay) -> Site Pages
      3) Click on Welcome Page -> Advanced
      4) Upload .ico file (in the attachment favicon.ico) in Icon

      Actual Behavior:
      The page is crashed. Please refer to the screenshot crached.png. The below error will occur:

      06:19:30,224 ERROR [http-bio-9080-exec-8][render_portlet_jsp:132] null
      java.lang.IllegalArgumentException: Width (1) and height (0) must be > 0
              at java.awt.image.SampleModel.<init>(SampleModel.java:126)
              at java.awt.image.MultiPixelPackedSampleModel.<init>(MultiPixelPackedSampleModel.java:147)
              at java.awt.image.MultiPixelPackedSampleModel.<init>(MultiPixelPackedSampleModel.java:107)
              at java.awt.image.Raster.createPackedRaster(Raster.java:846)
              at java.awt.image.Raster.createPackedRaster(Raster.java:588)
              at java.awt.image.BufferedImage.<init>(BufferedImage.java:442)
              at com.sun.media.jai.codecimpl.WBMPImageDecoder.decodeAsRenderedImage(WBMPCodec.java:263)
              at com.sun.media.jai.codec.ImageDecoderImpl.decodeAsRenderedImage(ImageDecoderImpl.java:140)
              at com.liferay.portal.image.ImageToolImpl.read(ImageToolImpl.java:580)
              at com.liferay.portal.image.ImageToolImpl.read(ImageToolImpl.java:424)
              at com.liferay.portal.image.ImageToolImpl.getImage(ImageToolImpl.java:351)
              at com.liferay.portal.kernel.image.ImageToolUtil.getImage(ImageToolUtil.java:144)
              at com.liferay.portal.service.impl.ImageLocalServiceImpl.updateImage(ImageLocalServiceImpl.java:144)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
              at com.liferay.portal.service.impl.LayoutLocalServiceImpl.updateLayout(LayoutLocalServiceImpl.java:2380)
              at com.liferay.portal.service.impl.LayoutLocalServiceStagingAdvice.updateLayout(LayoutLocalServiceStagingAdvice.java:271)
      

      Expected Behavior:
      An UI error displayed, the page can't be saved successful, the page still keeps Advanced tab page.

        Attachments

        1. crached.png
          crached.png
          25 kB
        2. favicon.ico
          1 kB

          Issue Links

            Activity

              People

              • Assignee:
                shitian.zhang Shitian "Shelton" Zhang (Inactive)
                Reporter:
                hai.yu Hai Yu
                Participants of an Issue:
                Recent user:
                Esther Sanz
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  4 years, 8 weeks, 2 days ago

                  Packages

                  Version Package
                  6.2.X EE