Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-1722

Allow for a Principal instance as the Context.SECURITY_PRINCIPAL in LoginInitialContextFactory

XMLWordPrintable

      org.jboss.security.jndi.LoginInitialContextFactory does the following:

      Object principal = env.get(Context.SECURITY_PRINCIPAL);

      String username = principal != null ? principal.toString() : null;

      This code assumes the principal is just a String. It does not test to see if it's a Principal class implementation.
      As a consequence, all principal objects which implement Principal won't work because it is not guarateed that their toString() method returns the principal name just like the getName() method does.

              starksm64 Scott Stark (Inactive)
              starksm64 Scott Stark (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: