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

The handler is not honored if a CSRF/Secure form fails validation #3

Open
alfredodeza opened this issue Jan 19, 2013 · 2 comments
Open

Comments

@alfredodeza
Copy link

If a Form uses the the SecureForm (that inherits from the CSRF form) even when specifying a handler to deal with errors an abort(403) is raised if validation fails.

Shouldn't specifying a handler in the decorator prevent this behavior?

@ryanpetrello
Copy link
Owner

Can you give me an example of what you're trying to do?

@alfredodeza
Copy link
Author

I am using a SecureForm to validate a username and a password but when calling super on it it tries to validate the CSRF first, and when it fails, it can hit this abort: https://github.com/ryanpetrello/pecan-wtforms/blob/master/pecan_wtforms/form.py#L53

My problem is that this obfuscates the errors as I wasn't able to find it initially on my code.

Is that a bit more clearer?

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

2 participants