Giter Site home page Giter Site logo

Comments (3)

mikejolley avatar mikejolley commented on July 20, 2024

Hey Justin

I'm not sure I agree with this one. If you say used custom actions on other registration forms, the benefit of using a captcha such as this is effectively nullified. Bots would just use the other endpoints.

WooCommerce does use register_post action so captchas are output on the forms, which I think I'm going to remove/prefix shortly. But I also wonder if the reason why this one has problems is the use of register_post action to do the validation?

The codex here reveals that this hook should not be used for custom validation:

https://codex.wordpress.org/Plugin_API/Action_Reference/register_post

Please note that this hook should never be used for custom validation. Any custom validation rules should be performed using the registration_errors filter

This won't work in our case either because we don't fire that filter, but just making you aware in case you want to change it :)

from registration-honeypot.

justintadlock avatar justintadlock commented on July 20, 2024

Core WP needs a proper registration form function like it has a login form function. Until then, I don't think this plugin should attempt to display fields anywhere but on the core WP registration screen. That was always the intention anyway. Changing that will only make sure that it works as intended.

Thanks for the tip on the registration_errors hook for validation.

from registration-honeypot.

justintadlock avatar justintadlock commented on July 20, 2024

Actually, looking back through the code, I see why I avoided registration_errors in favor of register_post. From what I understand, registration errors get printed to the screen when the user is returned to the registration screen. I wanted to kill the entire process and not return errors. We're assuming it's a spambot 100% of the time and don't want to give it another chance to fill in the form.

Anyway, I'm getting a bit off-topic. This issue is about displaying the honeypot field when not on the core registration screen.

from registration-honeypot.

Related Issues (4)

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.