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

ResourceActionsUtil parsing of model does not trim whitespace

    Details

      Description

      While processing model reources, Element.getText is used instead of either
      element.elementTextTrim... or element.elementText().trim()

      If a user had formatted their resources-actions/default.xml; eclipse can cause the name to end with a new line and some tabs.

      That said, when a user try to do a permissioncheck with that model name, it is not found.

      example:
      <model-name>foo.company.something.modelName
      </model-name>
      is stored internally as "foo.company.something.modelName\n\t" and will not match a request for model "foo.company.something.modelName"

      Line 904: String name = resource.elementText("model-name");

      solution: String name = resource.elementText("model-name").trim();

        Attachments

          Activity

            People

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

              Dates

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

                Packages

                Version Package
                --Sprint 12/11
                6.1.0 CE RC1