]
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: