Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation method must not be called by event handler #33

Open
masooh opened this issue Jul 17, 2023 · 0 comments
Open

Validation method must not be called by event handler #33

masooh opened this issue Jul 17, 2023 · 0 comments

Comments

@masooh
Copy link
Collaborator

masooh commented Jul 17, 2023

In Stripes Actions every public method which returns a resolution can be called. This is never intended, sometimes dangerous, but possible for validation methods.

@UrlBinding("/")
public class SomeAction extends ActionBean {

   @DefaultHandler
   public Resolution view() {
      return new RedirectResolution("/target.htm");
   }

   @ValidationMethod
   public Resolution validate() {
      return null;
   }
}

You could call http://localhost/?validate and then trigger the validate method twice. Once in custom validation lifecycle and once in event handler lifecycle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant