Giter VIP home page Giter VIP logo

invisiblerecaptcha's Introduction

invisiblerecaptcha

Google invisible recaptcha for TYPO3 powermail to prevent spam

Example form with a google invisble recaptcha

Installation

  • Just install this extension - e.g. composer require in2code/invisiblerecaptcha
  • Register your domain to www.google.com/recaptcha/
  • Add sitekey and secretkey to TypoScript Constants (see example below)
  • Replace your submit button with the new field type "Google Invisible Recaptcha"
  • Have fun

Example for TypoScript Constants:

plugin.tx_invisiblerecaptcha.sitekey = 6LdsBBUTAAAAAKMhI67inzeAvzBh5JdRRxlCwbTz
plugin.tx_invisiblerecaptcha.secretkey = 6LdsBBUTAAAAAKMhaaaainzeAvzBh5JdRRxlCwbyy

Notes and best practice

Be sure to have spamshield enabled in powermail (TypoScript setup):

plugin.tx_powermail.settings.setup.spamshield._enable = 1

Keep up to date if powermail recognize spam (TypoScript setup):

# Get an email if spam was recognized
plugin.tx_powermail.settings.setup.spamshield.email = [email protected]

# Write to a logfile when spam was recognized
plugin.tx_powermail.settings.setup.spamshield.logfileLocation = typo3temp/logs/powermailSpam.log

Changelog

Version Date Description
7.0.2 2024-02-07 TER release for powermail 11.x - 12.x / TYPO3 12
7.0.1 2024-01-23 Update for powermail 11.x - 12.x / TYPO3 12
7.0.0 2023-07-10 Update for powermail 11.x / TYPO3 12
6.0.0 2023-07-10 Update for powermail 10.x / TYPO3 11
5.1.1 2021-09-25 Fix a typo in ter-release.yml file
5.1.0 2021-09-09 Added auto deployment to TER, add extension key to composer.json file
5.0.0 2020-12-03 Update for powermail 8.x
4.0.0 2018-11-21 Update for powermail 7.x, small bugfix in Template file
3.0.0 2018-07-13 Update for powermail 6.x
2.0.0 2018-01-31 Update for powermail 5.x
1.1.1 2017-11-10 Replace hardcoded button title in template
1.1.0 2017-11-04 Update dependencies for powermail 4.x
1.0.0 2017-03-13 Initial upload - have fun

invisiblerecaptcha's People

Contributors

einpraegsam avatar mschwemer avatar sbusemann avatar chrisb9 avatar dhoffmann1979 avatar lagerregal42 avatar kanti avatar sascha-egerer avatar

Stargazers

 avatar  avatar Stefano Kowalke avatar Wolfgang Wagner avatar

Watchers

 avatar James Cloos avatar  avatar Steve Lenz avatar  avatar

invisiblerecaptcha's Issues

Deactivating JS in browser disables Google Recaptcha and submits powermail form

By adding the EXT:invisiblerecaptcha the whole powermail form and all fields can be submitted anyway! It should be verfied if JS is activated or not. Otherwise everyone can disable JS and submit a form without veryfiing.

Should be work like Google says and shows in example page:
[https://www.google.com/recaptcha/api2/demo?invisible=true]

EXT:invisiblerecpatcha: 4.0.0
EXT:powermail: 7.3.0
TYPO3: 9.5.5
OS: Linux
PHP: 7.2

Compatibility EXT:invisiblerecaptcha with EXT:powermail > 5.x

Hello Alex

due to your EXT:powermail is already on version 5.3.1 it seems that your extension invisiblerecaptcha isn't compatible with your actual powermail, right?

If i install bough extension EXT:powermail 5.3.1 and EXT:invisiblerecaptcha 1.1.1 on the FE output there is only a PHP error coming.

Are there any plans concerning adapting your ext with EXT:powermail > 5?

Thanks for feedback.

Regards,
Angelo

Inviseble catpcha breaks the ajax handling

I handle my form in a modal window so I need the validation and submission to be handled trough an Ajax request ...

plugin.tx_powermail {
     settings {
         setup {
             misc {
                 ajaxSubmit = 1
             }
         }
     }
 }

this works, but invisibile captcha substitutes the submit button and the setting stops having effect !

90% spam probability when using invisiblerecaptcha

when I include invisiblerecaptcha in my forms (name, mail, message) we get the following error-message after sending the message:

  • Spam in Nachricht vermutet: 90% Spam-Wahrscheinlichkeit in dieser Nachricht!

Typo3 9.5.22
Powermail 7.4.0
invisiblerecaptcha 4.0.0

Spamfactor of this mail: 90%
Failed Spamchecks:
- Google Invisible Recaptcha failed

[tx_powermail_pi1] => Array
        (
            [action] => create
            [controller] => Form
            [__referrer] => Array
                (
                    [@extension] => Powermail
                    [@vendor] => In2code
                    [@controller] => Form
                    [@action] => form
                    [arguments] => YTowOnt91def9af79c6e7ffbbdaf17502e78b885fba13061
                    [@request] => a:4:{s:10:"@extension";s:9:"Powermail";s:11:"@controller";s:4:"Form";s:7:"@action";s:4:"form";s:7:"@vendor";s:7:"In2code";}3ec1aa94fcbd5b6e8564323a1c25d433f278b96f
                )

            [__trustedProperties] => a:2:{s:5:"field";a:4:{s:4:"name";i:1;s:6:"e_mail";i:1;s:9:"nachricht";i:1;s:4:"__hp";i:1;}s:4:"mail";a:1:{s:4:"form";i:1;}}fea45a8db13f6429e3f0e7e7969baabd5c4cd89d
            [field] => Array
                (
                    [name] => MyName
                    [e_mail] => ***
                    [nachricht] => Sehr geehrte Damen und Herren,
diese Nachricht sieht wie eine legitime E-Mail aus welche über das Kontaktformular versendet wurde. 
Es handelt sich hierbei jedoch lediglich um einen Test ob der SPAM-Schutz funktioniert.

Diese Mail kann gelöscht werden. Vielen Dank und liebe Grüße
MyName
                    [__hp] => 
                )

            [mail] => Array
                (
                    [form] => 1
                )

        )

mailform not send when submit button clicked

I have 2 systems with the same behaviour. One is with T10 with 5.1.1 and the other with T11 and v6. Invisiblerecaptcha is installed and connected with google. When click on submit, it seems nothing happens. No mail send, and no error message showed. Just nothing. Investigating it, it turned out that the js flashes a message, "disabled". So what is wrong here? Where is that "disabled" coming from? And how to get the form being send after submitting the mailform?

Also started a topic on this in the TYPO3 Slack channel - ext-powermail
Scherm­afbeelding 2023-10-09 om 12 04 36

Adding invisiblerecaptcha breaks client-side validation via parsley on submit

The normal parsley-validation during input like "must be a valid email-address" still works. But the submit-validation of parsley which prevents submission of the form is required fields are missing doesn't work for me once invisiblerecaptcha is installed. It seems the validation is triggered, but even if it fails the captcha-validation kicks in, verifies the captcha is fine and submits the form. Missing required-fields are then only detected by the server-side validation of powermail 5.x.

were is this text coming from?

Adding the invisible-recaptcha in a powermailform shows the word "recaptcha" which is set in the title/ tag form for the the form-field. It can not be used with an empty title. How to get the recaptcha in without this title tag and without applying additional css "visibility hide"? Als showing a "spam 90% message" ? T310.4.37 and powermail 8.4.2.

Scherm­afbeelding 2023-09-27 om 19 10 14

how to apply with multilanguage - multidomains?

How to apply the invisible-recaptcha when having a multi-language site, where each language has its own domain- url? So there are 3 google-key codes created one for each domain. The form is also translated for the 3 languages.

Scherm­afbeelding 2023-09-26 om 15 12 49

If powermail action is optinConfirm spam check should be skipped

Likewise the form action 'create' in combination with the flexform setting 'confirmationActive==1', the form action 'optinConfirm' in combination with the flexform setting 'optin==1' should skip the spam check so the user will not get the message "Spam recognized: 90% Spam chance in this message!" and the optin action is completed.

   if (property_exists($this, 'flexForm')) {
       $confirmationActive = $this->flexForm['settings']['flexform']['main']['confirmation'] === '1';
       $optinActive = $this->flexForm['settings']['flexform']['main']['optin'] === '1';
       $formAction = $this->getActionName();
       if ($formAction === 'create' && $confirmationActive || $formAction === 'optinConfirm' && $optinActive) {
           return true;
       }
   }

powermail 8.2.4 support

When using invisiblerecaptcha 5.0.0 with powermail 8.2.4 on typo3 10.4.10, the parsley.js doesn't seem to work with the reCaptcha.

form not validate required fields!

Hello there,

I'm using this extension right now, but when I submit the form, it redirects, thus the required fields aren't validated.
If there is something that I should have implemented but forgot, could you kindly confirm it for me? Thank you.

AJAX validation

Is it possible to validate the form via AJAX? I´ve set the powermail option plugin.tx_powermail.settings.setup.misc.ajaxSubmit = 1
but it doesn´t work with invisiblerecaptcha and confirmation-option.
But that would be great :-)
Thanks in advance!
Stefanie

An error occurs ("Argument 2 passed to") after form submit

I'm getting this error when sending a form with invisible recaptcha activated:
`Argument 2 passed to

In2code\Powermail\ViewHelpers\Getter\GetFieldPropertyFromMarkerAndFormViewHelper::render() must be an instance of In2code\Powermail\Domain\Model\Form, null given`

The original template looks like this:
`
<f:section name="main">
<f:flashMessages/>

<f:if condition="{form}">
    <f:then>
        <f:if condition="{form.css}">
            <f:then>
                <f:render partial="Forms/{form.css}" arguments="{_all}"/>
            </f:then>
            <f:else>
                <div class="row">
                    <f:form
                            action="{action}"
                            id="contact-form"
                            name="field"
                            class="powermail_form powermail_form_{form.uid} {form.css} {settings.styles.framework.formClasses} {vh:Misc.MorestepClass(activate:settings.main.moresteps)}"
                            enctype="multipart/form-data"
                            additionalAttributes="{vh:Validation.EnableParsleyAndAjax(form:form)}"
                            addQueryString="{settings.misc.addQueryString}"
                    >
                        <f:render partial="Misc/FormError" arguments="{_all}"/>
                        
                        <div class="contact-left">
                            <f:for each="{form.pages}" as="page" iteration="iterator">
                                <fieldset class="powermail_fieldset powermail_fieldset_{page.uid} {f:if(condition:'{page.css}==\'layout2\'', then: 'col-md-6 split-select', else: page.css)}">
                                    <f:for each="{page.fields}" as="field">
                                        <f:render partial="Form/Field/{vh:String.Upper(string:field.type)}" arguments="{field:field}"/>
                                    </f:for>
                                </fieldset>
                            </f:for>
                        </div>
                        
                        <f:form.hidden name="mail[form]" value="{form.uid}" class="powermail_form_uid"/>
                        <f:render partial="Misc/HoneyPod" arguments="{form:form}"/>
                    </f:form>
                </div>
            </f:else>
        </f:if>
    </f:then>
    <f:else>
        <f:translate key="error_no_form"/>
    </f:else>
</f:if>

</f:section>
`

I have copied/overwritten the files from the original invisiblerecaptcha extension to the modified powermail Partials and Templates folder in my own extension folder.

Any suggestions or solutions on this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.