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

Impersonating a Site Administrator causes errors when searching for users

    Details

    • Type: Regression Bug
    • Status: Closed
    • Resolution: Duplicate
    • Affects Version/s: 7.2.X, Master
    • Fix Version/s: None
    • Component/s: User Management
    • Labels:

      Description

      Description

      A customer has found an issue where searching for users to add to a site causes errors in the logs when impersonating a user assigned the site role Site Administrator. Errors in the logs say that the customer is unable to impersonate the user. They are able to search for users when they are actually logged in as the user and add them with no errors in the logs.

      Reproduction Steps

      1. Create a new user.
      2. Add the new user to site 'Liferay'.
      3. Assign the site role 'Site Administrator' to the new user.
      4. Impersonate the new user and go to site 'Liferay'.
      5. Navigate to Site Administration > People > Memberships.
      6. Press the blue + button and search for a random member using the search bar on the pop-up window.

      Results:

      Expected: Member search shows search results of the desired member
      Actual: Member search shows search results but also produces a stacktrace that has numerous errors, as seen below: 

      2020-07-07 21:47:22.364 WARN  [http-nio-8080-exec-9][PortalImpl:7831] Unable to impersonate 1RkRw1QbbnVQ6kFspvDwGA because the string cannot be decrypted
      2020-07-07 21:47:22.380 ERROR [http-nio-8080-exec-9][UserSearch:156] Unable to initialize user search
      java.lang.StringIndexOutOfBoundsException: String index out of range: 22
      

      Reproduced on:

      master: a89c1da12c672237bb654a17f8b5caf9c93cb87
      7.2.x: 48bd994223add6e95117e69a5768d313b79bb1d9

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kevin.lee Kevin Lee
              Reporter:
              kevin.lee Kevin Lee
              Participants of an Issue:
              Recent user:
              Kevin Lee
              Engineering Assignee:
              Kevin Lee
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                15 weeks, 1 day ago

                  Packages

                  Version Package