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

Issue with Liferay opensocial container - Shindig, rewriting all images

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Won't Fix
    • Affects Version/s: 6.1.20 EE GA2
    • Fix Version/s: 6.1.20 EE GA2
    • Labels:
    • Environment:
      LIFERAY VERSION: 6.1 GA1
      OPERATING SYSTEM: Windows Server 2008
      APPLICATION SERVER: Tomcat 7.0
      JAVA VIRTUAL MACHINE: Java 6
      DATABASE: Other
    • Fix Priority:
      4

      Description

      ISSUE
      Shindig is rewriting all images and there's a bug with PNG images - they are corrupted and whole image is filled by the color of the first pixel. The bug is not still resolved: https://issues.apache.org/jira/browse/SHINDIG-1665.

      STEPS TO REPRODUCE
      1.       Create simple gadget. Go to Control Panel choose "Opensocial Gadget Editor" from left menu.
      2.       Add following xml to gadget editor area. This xml contains gadget declaration with an image - jquery-ui icons PNG with transparent background:

      <?xml version="1.0" encoding="utf-8" ?>
      <module>
      <ModulePrefs title="Gadget">
      <Require feature="opensocial-1.0" />
      <Require feature="osapi" />
      <Require feature="pubsub-2"></Require>
      <Require feature="dynamic-height" />
      </ModulePrefs>

      <Content type="html"> <![CDATA[

      <img src="//ajax.aspnetcdn.com/ajax/jquery.ui/1.9.0/themes/base/images/ui-icons_222222_256x240.png" alt=""></img>

      ]]> </Content>
      </module>

      3.       Click Save button.
      4.       From gadget context menu choose "Publish"
      5.       Create Page on Liferay portal and drag and drop the gadget to the page (Add-> More -> Gadgets -> Gadget):
      6. This should result in a block of dark gray color filling the portlet instead of individual icons.

      PROPOSED WORKAROUNDS
      1. Disable PNG image URL rewriting in html markup - disable liferay proxy (configuration property "shindig.content-rewrite.exclude-urls")
      2. Set min threshold for image size that are allowed to be rewritten to some big value like 1GB (configuration property "shindig.image-rewrite.min-threshold-bytes" in shindig.properties file)

      First option has drawbacks because all requests for PNG images would go directly to the web server and it would need to be exposed to internet. Clients would have access not only to Liferay server but to the web server.

      Second option's only drawback is in Shindig source code in that it is reading full image body to object model before checking this parameter. This would result in increased latency of the request and the request is not using buffered output.

        Attachments

          Activity

            People

            • Assignee:
              marco.abamonga Marco Abamonga
              Reporter:
              marco.abamonga Marco Abamonga
              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:
                6 years, 25 weeks, 1 day ago

                Packages

                Version Package
                6.1.20 EE GA2