Forums

Unfortunately no one can be told what FluxBB is - you have to see it for yourself.

You are not logged in.

#1 2015-03-03 13:21:10

ilhooq
Member
Registered: 2015-03-03
Posts: 3

New Securimage captcha addon

Hi,

I built a little addon to use Securimage as captcha on user registration. This addon works without modifications of the FluxBBcode. It simply uses existing hooks.

Here is the ZIP hosted on the forum where I use it :
jea.sphilip.com/forum/securimage_captcha_addon.zip

Offline

#2 2015-03-03 14:27:03

GWR
Member
From: Germany
Registered: 2010-08-06
Posts: 194

Re: New Securimage captcha addon

Contents of zip file:
File should be dropped in the "addons" directory, not the root of fluxbb

securimage.php:

		if ($script == 'register.php') {
			session_start();
		}

session_start will create an e_notice if another session was already started. Of course it reuses the existing session afterwards.


		if ($securimage->check($_POST['captcha_code']) == false) {

If "$_POST['captcha_code']" is not set you will raise an error. Maybe include a default value to avoid information exposure on wrongly configured hosts (you expose error positions, maybe used scripts etc.)

					<img id="captcha" src="plugins/securimage/securimage_show.php" alt="CAPTCHA Image" /><br>

Aehem... "plugins/securimage" - when is this directory created? Script itself includes it "local" ("securimg.php-directory/securimage").



Do not take above notes a pure critics, nice to have some more options to choose from.

bye
Ron

Offline

#3 2015-03-03 15:18:50

ilhooq
Member
Registered: 2015-03-03
Posts: 3

Re: New Securimage captcha addon

Thank for your quick review. I fixed these issues.

To have some more options, the simpliest way is to edit the file securimage/securimage_show.php

Here is the content of this file :

...

$img = new Securimage();

// You can customize the image by making changes below, some examples are included - remove the "//" to uncomment

//$img->ttf_file        = './Quiff.ttf';
//$img->captcha_type    = Securimage::SI_CAPTCHA_MATHEMATIC; // show a simple math problem instead of text
//$img->case_sensitive  = true;                              // true to use case sensitve codes - not recommended
//$img->image_height    = 90;                                // height in pixels of the image
//$img->image_width     = $img->image_height * M_E;          // a good formula for image size based on the height
//$img->perturbation    = .75;                               // 1.0 = high distortion, higher numbers = more distortion
//$img->image_bg_color  = new Securimage_Color("#0099CC");   // image background color
//$img->text_color      = new Securimage_Color("#EAEAEA");   // captcha text color
//$img->num_lines       = 8;                                 // how many lines to draw over the image
//$img->line_color      = new Securimage_Color("#0000CC");   // color of lines over the image
//$img->image_type      = SI_IMAGE_JPEG;                     // render as a jpeg image
//$img->signature_color = new Securimage_Color(rand(0, 64),
//                                             rand(64, 128),
//                                             rand(128, 255));  // random signature color

// see securimage.php for more options that can be set

...

Offline

#4 2015-03-03 18:07:43

chris98
Member
From: England, United Kingdom
Registered: 2013-05-31
Posts: 1,292
Website

Re: New Securimage captcha addon

Here is the ZIP hosted on the forum where I use it :
jea.sphilip.com/forum/securimage_captcha_addon.zip

Please paste any relevant code in code tags in this thread. Not many people make habits of downloading arbitrary files from the web.

In addition you may consider uploading it here.

Last edited by chris98 (2015-03-03 18:08:56)

Offline

#5 2015-03-03 22:22:18

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 6,632
Website

Re: New Securimage captcha addon

Yeah, it would be cool if you could upload this to our modification repository.


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

#6 2015-03-04 11:01:25

ilhooq
Member
Registered: 2015-03-03
Posts: 3

Re: New Securimage captcha addon

When reading the Resources overview, I thought I had to submit my proposal on the forum. I didn't see I could upload directly on your repository.

That is done now : //fluxbb.org/resources/mods/securimage-captcha-addon/releases/1.0/

Offline

#7 2015-03-04 11:19:44

Visman
Member
From: Siberia
Registered: 2010-07-10
Posts: 1,200
Website

Re: New Securimage captcha addon

quiet horror smile

Offline

Board footer

Powered by FluxBB