[gatein-issues] [JBoss JIRA] (GTNWCI-29) NullPointerException in WCILoginModule when TicketService does not return credentials
Marek Posolda (Updated) (JIRA)
jira-events at lists.jboss.org
Wed Nov 23 17:05:40 EST 2011
[ https://issues.jboss.org/browse/GTNWCI-29?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marek Posolda updated GTNWCI-29:
--------------------------------
Attachment: GTNWCI-29.patch
Patch for handling situation when credentials are null and return false in this case.
> NullPointerException in WCILoginModule when TicketService does not return credentials
> -------------------------------------------------------------------------------------
>
> Key: GTNWCI-29
> URL: https://issues.jboss.org/browse/GTNWCI-29
> Project: GateIn Web Container Integration
> Issue Type: Bug
> Affects Versions: 2.1.0-GA
> Reporter: Marek Posolda
> Priority: Minor
> Attachments: GTNWCI-29.patch
>
>
> In WCILoginModule is code like:
> {code}
> Credentials credentials = GenericAuthentication.TICKET_SERVICE.validateTicket(password, true);
> sharedState.put("javax.security.auth.login.name", credentials.getUsername());
> sharedState.put("javax.security.auth.login.password", credentials.getPassword());
> {code}
> in case that ticketService return null, we have NPE when calling credentials.getUsername().
> In this case, NullPointerException is catched and rethrown as LoginException and WCILoginModule is declared as optional in GateIn/EPP. So it's minor issue without effect to users. Inspite of it, I think cleaner to handle this case in better way than throwing NullPointerException.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the gatein-issues
mailing list