Hi,
Today one of our clients did an unscheduled security audit of a web app
written using stripes by mistake. Until we managed to call in to stop
it, I was seeing some interesting things in logs. One thing caught my
attention because the behavior was a bit unexpected. Perhaps it is my
misunderstanding, but I'd like to confirm nonetheless.
This is part of a login process. A simple action bean that has the
following fields:
@Validate(required = true)
private String username;
@Validate(required = true)
private String password;
Since both fields are required, I'm expecting to have this action bean
called until there are some values in both fields. But I kept on seeing
a NullPointerException located at setUsername:
WebUserFactory factory =
(WebUserFactory)config.getUserFactoryInstance();
factory.setUsername(username);
factory.setPassword(password);
Function setUsername is as follows:
public void setUsername(String username)
{
this.username = username.toUpperCase();
}
The only way there can be a NullPointerException is if username was a
null. How can that be if username is a required field? At this point I'm
not expecting this to happen at all. I hope I've provided enough
information to support the question.
Daniil
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users