-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
recaptcha inside a fieldset doesn't validate and allows any submission (
#190) * Put in tests to show recaptcha validation prevents submissions * add robot tests to coverage * fix flake8 * try improve caching * show failing test recaptcha in a fieldset * show failing test recaptcha in a fieldset * fix fieldsets with recaptcha usecase * flake 8 * more detailed comment * flake8 * simply test * more generic solution so IValidator adapters still work on fields * flake8 * flake8 * put in comments and make clearer * add in less specific adapter call for defaults also to pick up any fields with default adapters. * flake8 * show test results quicker * try to make the code clearer * more reusable way of getting the superAdapter * make more generic
- Loading branch information
Showing
5 changed files
with
91 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/collective/easyform/tests/fixtures/fieldset_recaptcha.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<model xmlns:easyform="http://namespaces.plone.org/supermodel/easyform" xmlns:form="http://namespaces.plone.org/supermodel/form" xmlns:i18n="http://xml.zope.org/namespaces/i18n" xmlns:indexer="http://namespaces.plone.org/supermodel/indexer" xmlns:lingua="http://namespaces.plone.org/supermodel/lingua" xmlns:marshal="http://namespaces.plone.org/supermodel/marshal" xmlns:security="http://namespaces.plone.org/supermodel/security" xmlns:users="http://namespaces.plone.org/supermodel/users" xmlns="http://namespaces.plone.org/supermodel/schema"> | ||
<schema> | ||
<fieldset name="fs1" label="Fieldset 1"> | ||
<field name="verification" type="collective.easyform.fields.ReCaptcha"> | ||
<description/> | ||
<required>False</required> | ||
<title>Verification</title> | ||
</field> | ||
</fieldset> | ||
</schema> | ||
</model> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters