Git Product home page Git Product logo

Comments (1)

dapphp avatar dapphp commented on May 31, 2024

Hi Ole73,

Sorry for the delayed response. This is a valid issue. To overcome it, the latest version (currently in branch nextgen) creates a unique captcha ID along with each code it generates. The form now must submit a hidden captcha ID input as well as the code. On an unrelated but similar note, I also introduced "storage adapters" so there's a uniform interface to code storage be it in the session, database, memcached, redis or elsewhere. This makes it easy to change your storage backend to a database to get around other session issues with load balancing.

The nextgen branch is production ready and I've been using that code base on a number of sites, and in the WordPress plugin. Unfortunately it hasn't been merged because I haven't done the documentation and site updates.

I'd encourage you to give the nextgen branch a try.

In the securimage config, set 'no_session' => true, and 'use_database' => true, and then set the 'database_driver' => Securimage::SI_DRIVER_MYSQL, as appropriate. It will use PDO_* for connecting. See https://github.com/dapphp/securimage/blob/nextgen/config.inc.php.SAMPLE and the following examples from the WordPress plugin may help as well:

https://plugins.trac.wordpress.org/browser/securimage-wp/trunk/securimage-wp.php#L415
https://plugins.trac.wordpress.org/browser/securimage-wp/trunk/lib/siwp_captcha.php

If you use PDO MySQL, you can ignore the part about the WordPress storage adapter and set use_database, and the database options and it'll do the rest, no need to specify anything special there. But if you want to write your own or piggy back off an existing DB connection, have a look at https://plugins.trac.wordpress.org/browser/securimage-wp/trunk/lib/StorageAdapter/Wordpress.php and https://github.com/dapphp/securimage/tree/nextgen/StorageAdapter

Sorry for the lack of documentation and hiding away this ready to go version.

Please don't hesitate to get in contact with me directly if you want to try this version and have any questions.

from securimage.

Related Issues (20)

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.