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

Support multipart? #1

Closed
ottob opened this issue Sep 9, 2013 · 4 comments
Closed

Support multipart? #1

ottob opened this issue Sep 9, 2013 · 4 comments

Comments

@ottob
Copy link

ottob commented Sep 9, 2013

Thanks for this filter, it's working great but I have found one small issue. I have a form with enctype="multipart/form-data", my guess is that this causes problems with sentToken = r.PostFormValue(fieldName). In this case my sentToken becomes an empty string and the csrf check fails.

@ottob
Copy link
Author

ottob commented Sep 9, 2013

This fixes it for me:
change sentToken = r.PostFormValue(fieldName) to sentToken = c.Params.Get(fieldName)

It uses the values from revel ParamsFilter which has already been executed.

@cbonello
Copy link
Owner

cbonello commented Sep 9, 2013

Hi Otto. Thanks for taking time to fix the issue. I've updated the GitHub
repository.

On Mon, Sep 9, 2013 at 4:28 PM, Otto Bretz notifications@github.com wrote:

This fixes it for me:
change sentToken = r.PostFormValue(fieldName) to sentToken =
c.Params.Get(fieldName)

It uses the values from revel ParamsFilter which has already been executed.


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-24063065
.

@AllenDang
Copy link
Contributor

I think my pull request has overwritten this fix... Please fix it again.

@cbonello
Copy link
Owner

I'm new to Github. Learning curve is difficult... Should be fixed now.
Thanks.

On Wed, Sep 11, 2013 at 9:41 AM, Allen Dang notifications@github.comwrote:

I think my pull request has overwritten this fix... Please fix it again.


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-24212171
.

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

3 participants