Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-6159

UserPrincipal search in RemotingLoginModule seems to be broken

    XMLWordPrintable

    Details

      Description

      The code of UserPrincipal search in RemotingLoginModule seems to be invalid.
      There's

      UserPrincipal up = null;
      for (Principal current : con.getPrincipals()) {
          if (current instanceof UserPrincipal) {
              up = (UserPrincipal) current;
          }
          break;
      }
      

      but IMO, the correct code is:

      UserPrincipal up = null;
      for (Principal current : con.getPrincipals()) {
          if (current instanceof UserPrincipal) {
              up = (UserPrincipal) current;
              break;
          }
      }
      

      If the connection from RemotingContext contains more Principals, then only the first is checked. I.e. If the first Principal is not an UserPrincipal, then the RemotingLoginModule doesn't work.

        Attachments

          Activity

            People

            Assignee:
            jcacek Josef Cacek (Inactive)
            Reporter:
            jcacek Josef Cacek (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: