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

SessionClicks allows SESSION_CLICKS_MAX_ALLOWED_VALUES + 1 to be set to PortalPreferences

    Details

      Description

      Background:

      SessionClicks does the following check when trying to set a value to PortalPreferences:

      int size = portalPreferences.size();
      
      if (size <= _SESSION_CLICKS_MAX_ALLOWED_VALUES) {
      	portalPreferences.setValue(namespace, key, value);
      }
      

      However, "<=" is used in the condition. For example, if the "max allowed values" is 10, when there's 10 values, the "=" condition will be match, so the new value can still be added. As a result, 11 values will be added in total.

      Solution:

      The "=" condition should be removed.

        Attachments

          Activity

            People

            Assignee:
            tina.tian Tina Tian
            Reporter:
            dante.wang Dante Wang
            Participants of an Issue:
            Recent user:
            Clarissa Velazquez
            Engineering Assignee:
            Dante Wang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              18 weeks, 4 days ago

                Packages

                Version Package
                7.4.3.9 CE GA9
                Master