Comments (1)
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)
- Typo in PDO::purgeOldCodesFromDatabase() in master HOT 2
- Difference in captcha image reload functionally in the two branches HOT 1
- When using case sensitive captcha, the audio version just says the letter and not capital or lowercase letter
- Composer install post cmd error HOT 7
- [Bug reporting] multiple XSS in securimage
- secureimage.php – curley braces are deprecated HOT 1
- Redis setTimeout is deprecated consider changing to expire HOT 1
- php8 float conversion HOT 1
- Compatibility with PHP 8.2 HOT 1
- www.phpcaptcha.org domain for sale HOT 2
- dynamic property Securimage.... is deprecated in php 8.2 HOT 1
- New release? HOT 1
- Deprecated with php v8.2 HOT 1
- can't install via composer HOT 2
- captcha Audio with Captcha IDs
- Erreur: Undefined class constant 'SI_DRIVER_SQLITE3' in StorageAdapter/PDO.php file HOT 1
- Illegal string offset 'code' in securimage.php:1403 HOT 3
- Curly brace syntax
- Composer version HOT 3
- Project status HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from securimage.