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

Ensure captcha field is properly removed from submission data #16

Merged
merged 4 commits into from
Feb 26, 2018

Conversation

loicteixeira
Copy link
Contributor

Fix #11.

@loicteixeira loicteixeira force-pushed the fix/11-process-submission branch from f6f8345 to 96a4984 Compare February 9, 2018 02:55
Copy link

@mojeto mojeto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing captcha form field isn't necessary and it is potentially dangerous. remove value from cleaned data should be enough.

@loicteixeira
Copy link
Contributor Author

loicteixeira commented Feb 26, 2018

So removing the field from the form is currently needed.

Indeed, when sending the notification email, it loops through the fields (instead of using cleaned_data like it does when saving the submission) which currently crash because it tries to join lists and the value of the field is [None, 'PASSED'] (in tests, I'm not too sure of the value in production).

I reckon it is worth opening an issue/PR upstream (to use cleaned_data instead of fields) but for now we might have to live with it.

Copy link

@mojeto mojeto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to remove field from the form then for now.

@loicteixeira loicteixeira merged commit 7b8c73e into master Feb 26, 2018
@loicteixeira loicteixeira deleted the fix/11-process-submission branch February 26, 2018 01:50
@loicteixeira
Copy link
Contributor Author

loicteixeira commented Feb 26, 2018

I've opened an issue on this repo 👆 and on Wagtail (and will propose a PR if they agree on the change).

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

Successfully merging this pull request may close these issues.

2 participants