Details

    • Branch Version/s:
      6.1.x, 6.0.x
    • Backported to Branch:
      Committed
    • Caused by:
      Feature/improvement was not complete
    • Where was the bug?:
      Java
    • Added to Fix Pack:
      Added
    • Similar Issues:
      Show 4 results 

      Description

      The StripFilter maintains a cache for inlined javascript code and inlined css rules. The idea is to minify the code only once. The key of the cache ist calculated by simply using the hashCode method on the input string. This usage of the hashCode function is wrong, because no collision detection is possible.

      Two totally different string values may have the same hashCode. This will result in a situation where the first value is replaced by the second one. If later the minified version of the first string is to be taken from the cache, the second value is retrieved.

      There are even some algorithms to generate a string that for a given hash code value (see for example http://java-bytes.blogspot.com/2009/10/hashcode-of-string-in-java.html).

      This bug is a very nasty one, because almost always things are running good. But in very rare situations the cache returns the wrong value. The following test code show an example:

      		assertEquals("HashCode values must not be used as keys".hashCode(), "I<EZH@$YJVK[".hashCode());
      

      As workaround you can disable the minifying of inlined javascript and css code by setting the property minifier.inline.content.cache.size to 0.

        Activity

        Olaf Fricke created issue -
        Zsolt Balogh made changes -
        Field Original Value New Value
        Assignee SE Support [ support-lep@liferay.com ] Zsolt Balogh [ zsolt.balogh ]
        Vicki Tsang (Inactive) made changes -
        Workflow Liferay Workflow 2.2 [ 259541 ] LPS Workflow [ 264367 ]
        Zsolt Balogh made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Fix Version/s 6.0.13 EE [ 10764 ]
        Fix Version/s 6.1.11 EE GA2 [ 11519 ]
        Fix Version/s 6.2.X [ 11316 ]
        Zsolt Balogh made changes -
        Status In Progress [ 3 ] In Review [ 10006 ]
        Git Pull Request https://github.com/matethurzo/liferay-portal/pull/98
        Assignee Zsolt Balogh [ zsolt.balogh ] Mate Thurzo [ mate.thurzo ]
        Zsolt Balogh made changes -
        Where was the bug? Java [ 10241 ]
        Caused by Feature/improvement was not complete [ 10212 ]
        Mate Thurzo made changes -
        Status In Review [ 10006 ] In Review [ 10006 ]
        Git Pull Request https://github.com/matethurzo/liferay-portal/pull/98 https://github.com/sergiogonzalez/liferay-portal/pull/156
        Assignee Mate Thurzo [ mate.thurzo ] Sergio Gonzalez [ sergio.gonzalez ]
        Peer Reviewer Name Mate Thurzo
        Peer Review Passed [ 10235 ]
        Brian Chan made changes -
        Fix Version/s 6.0.13 EE [ 10764 ]
        Backport Version/s 6.1.x [ 10511 ]
        Backport Committed Committed [ 10048 ]
        Affects Version/s 6.1.10 EE GA1 [ 11325 ]
        Affects Version/s 6.1.0 CE GA1 [ 10910 ]
        Brian Chan made changes -
        Status In Review [ 10006 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Zsolt Balogh made changes -
        Link This issue relates LPE-6430 [ LPE-6430 ]
        Zsolt Balogh made changes -
        Issue Type Bug [ 1 ] Technical Support [ 6 ]
        Michael Saechang made changes -
        Labels QA-C
        Michael Saechang made changes -
        Fix Version/s --Sprint 3/12 [ 11315 ]
        Affects Version/s 6.2.X [ 11316 ]
        Brian Chan made changes -
        Fix Version/s 6.0.13 EE [ 10764 ]
        Branch Version/s 6.1.x [ 10511 ] 6.0.x,6.1.x [ 10151,10511 ]
        Michael Saechang made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Zsolt Balogh made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Fix Version/s 6.1.10 EE GA1 [ 11325 ]
        Zsolt Balogh made changes -
        Status Reopened [ 4 ] Closed [ 6 ]
        Added to Fix Pack Added [ 10710 ]
        Resolution Fixed [ 1 ]
        Andrew Kim made changes -
        Issue Type Technical Support [ 6 ] Bug [ 1 ]
        Andrew Kim made changes -
        Workflow LPS Workflow [ 264367 ] Copy of LPS Workflow [ 428309 ]
        Andrew Kim made changes -
        Workflow Copy of LPS Workflow [ 428309 ] LPS Workflow [ 459918 ]
        Edward Gonzales made changes -
        Component/s Operations [ 14582 ]
        Andrew Kim made changes -
        Workflow LPS Workflow [ 459918 ] Copy 2 of LPS Workflow [ 492286 ]
        Andrew Kim made changes -
        Workflow Copy 2 of LPS Workflow [ 492286 ] LPS Workflow [ 524172 ]
        Randy Zhu made changes -
        Workflow LPS Workflow [ 524172 ] PUBLIC - LPS Generic Workflow [ 576067 ]
        Randy Zhu made changes -
        Workflow PUBLIC - LPS Generic Workflow [ 576067 ] Copy of PUBLIC - LPS Generic Workflow [ 610376 ]
        Randy Zhu made changes -
        Workflow Copy of PUBLIC - LPS Generic Workflow [ 610376 ] PUBLIC - LPS Generic Workflow [ 642305 ]
        Randy Zhu made changes -
        Workflow PUBLIC - LPS Generic Workflow [ 642305 ] PUBLIC - LPS General Workflow [ 735613 ]
        Randy Zhu made changes -
        Workflow PUBLIC - LPS General Workflow [ 735613 ] PUBLIC - LPS Bugs Workflow [ 831050 ]
        Esther Sanz made changes -
        Component/s Operations > Caching Infrastructure [ 14583 ]
        Component/s Operations > Caching > Replication Hook [ 11531 ]
        Michael Saechang made changes -
        Labels QA-C

          People

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

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              1 year, 24 weeks, 4 days ago

              Development

                Structure Helper Panel