Jump to content
Sign in to follow this  
Druide

NEW: Anti Robot Registration Validation

Recommended Posts

Uploaded 2.8.1

 

Missed some lingering bugs in validation_png.php from 2.6, fixed, no other files effected.

 

Some values, or combination of, could cause failure, some were incorrectly set.

 

I hope this has finally caught all those pesky bugs.

 

;)

 

 

which sql file should I run to update from 2.7 to 2.8? Do I have to upload validation_png?

Share this post


Link to post
Share on other sites

There is a file called ANTI ROBOT REGISTRATION 2.7 TO 2.8_ENGLISH.SQL !!

 

As I stated that in 2.8.1 the only file effected is validation_png.php then of course you should not upload that under any circumstances, as that would meen you got the corrected file!!!

 

:rolleyes:

Edited by spooks

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Try using the included file, if that works, check your install.


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites
Try using the included file, if that works, check your install.

 

I have checked everything many times but nothing changed .

I have installed the contribution Basic Design pack (http://addons.oscommerce.com/info/3570). Do you think it affects the Antirobot contribution? Because there is a file that changes the look of images. I can't find something else

Share this post


Link to post
Share on other sites

upload the included create_account.php and see if that works....

 


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites
upload the included create_account.php and see if that works....

 

 

 

no it doesn't work :wacko: :wacko: :(

Share this post


Link to post
Share on other sites
no it doesn't work :wacko: :wacko: :(

 

 

Do you have a url?


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

You have modified the tep_image function, iether put back the original, or creare a new as original, and direct the call within create_account to same.


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites
You have modified the tep_image function, iether put back the original, or creare a new as original, and direct the call within create_account to same.

 

which file contains the original tep_image? I think the problem came from the template I put

Share this post


Link to post
Share on other sites

catalog/includes/functions/html_output.php -> line 74 Referenced 824 times:


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Hello,

good contrib, but It doesnt work with INTERNET EXPLORER.

The first time is OK, but, for example, if I have entered a bad code, it will not display a new code to enter...

With my Mozilla : No problem !

 

Where is the problem please?

 

And it work only with validation_png_2.5.php.

Not with the last validation_png.php

Edited by zaini

Share this post


Link to post
Share on other sites

I've tested this on PHP 4 & 5, SQL 4 & 5, osC 2.2 ms2, rc1 & rc2a and it is register_globals compatible.

I`ve also tested on INTERNET EXPLORER & Firefox, saw no issues with latest.

 

As detailed ealier: You have modified the tep_image function, iether put back the original, or create a new as original, and direct the call within create_account to same.


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites
I've tested this on PHP 4 & 5, SQL 4 & 5, osC 2.2 ms2, rc1 & rc2a and it is register_globals compatible.

I`ve also tested on INTERNET EXPLORER & Firefox, saw no issues with latest.

 

As detailed ealier: You have modified the tep_image function, iether put back the original, or create a new as original, and direct the call within create_account to same.

 

 

I have put the original tep_image_function, it's the same problem... No image on Mozilla. An error image (the cross...) on IE.

With validation_png_2.5.php, no problem on Mozilla, but problems with IE (no the first time, but the second time if the first time, the visitor has not entered correctly the code)

Share this post


Link to post
Share on other sites

I`'' try this again last post got wiped on submit!!!

 

This is the solution for allthose with modified tep_image function failing to correctly display the png.

 

open includes/functions/validations.php

 

add before last ?>

 

 

 

////
// The HTML image wrapper function
 function tep_image_captcha($src) {
if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {
  return false;
}

$image = '<img src="' . tep_output_string($src) . '" border="0" alt=""';

$image .= '>';

return $image;
 }

 

then within contrib code replace any tep_image with: tep_image_captcha

 

Eg in create_account.php (586)

 

Find:

 

$validation_images = tep_image('validation_png.php?rsid=' . $new_guery_anti_robotreg['session_id']);

Replace with:

 

$validation_images = tep_image_captcha('validation_png.php?rsid=' . $new_guery_anti_robotreg['session_id']);

 

I hope that sorts it for you.

 

;)

Edited by spooks

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites
direct the call within create_account to same

 

What do you want to say?

I have modified all files correctly :D

In Mozilla, It's a powerful contrib !

Share this post


Link to post
Share on other sites

I have do your changements for tep_image_captcha.

Im still use validation_png_2.5.php : mozilla always good, IE I have to refresh many times in order to see the png...

Share this post


Link to post
Share on other sites
I have do your changements for tep_image_captcha.

Im still use validation_png_2.5.php : mozilla always good, IE I have to refresh many times in order to see the png...

 

 

try with the other validation_png


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Which version?

 

Here, the generated code html, with IE, if it could help you :

 

<td class="main"><b>Validation Code</b></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" cellspacing="2" cellpadding="2">
		  <tr>
			<tr>
			  <td class="main"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea">
				<tr>
				  <td class="main"><table border="0" cellspacing="0" cellpadding="2">
					<tr>
					  <td class="main" width="100%" NOWRAP><span class="main"> For the security of your information,<BR>please enter the characters in the grey box.<BR><i>This helps prevent automated processes</i>.</span></td>
					</tr>
					<tr>
					  <td class="main" width="100%">
<span>
<img src="validation_png.php?rsid=c0urflo3b65sk2ejjld9qom0u7" border="0" alt=""> <br> <input type="text" name="antirobotreg">  <small><font color="#FF0000">required</font></small></span>
			</td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><img src="images/pixel_trans.gif" border="0" alt="" width="10" height="10"></td>
  </tr>

Share this post


Link to post
Share on other sites

2.6 dont work on mozilla and IE

2.7 and 2.5 ok on mozilla, not always when the page is refreshed with IE

Very thanks for your attention

Share this post


Link to post
Share on other sites

Use version with 2.8.1, previous are bugged.

 

In that you can make a error message visable with this change.

 

find: (39)

 

[size="2"]// Do we have an id? No, then just exit
if(empty($HTTP_GET_VARS['rsid']))
{
echo 'Empty rsid!!';
exit;
}
[/size]

 

Replace with:

 

[size="2"]// Do we have an id? No, then just exit
[/size]if(empty($HTTP_GET_VARS['rsid']))
{
 header('Content-Type: image/png');
 header('Cache-control: no-cache, no-store');
 $im = @imagecreatetruecolor(250, 60)
  or die("Cannot Initialize new GD image stream");
$colour = imagecolorallocate($im, 255, 0, 0);
imagefill($im, 0, 0, $colour);  
$text_color = imagecolorallocate($im, 0, 0, 0);
imagestring($im, 5, 5, 5,  "Generation Error:", $text_color);
imagestring($im, 5, 50, 30,  "Missing RSID", $text_color);
imagepng($im);
imagedestroy($im);
 exit;
}

 

 


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Yes it's OK, this create this error, and always, on IE with Mozilla, after refresh or not :

 

Generation Error :

Missing RSID

Edited by zaini

Share this post


Link to post
Share on other sites

the rsid comes from calling page, ie create account, try with included password_forgotten, see if its a error on the page.

 

Otherwise its ie having trouble with sessions, clear your cache & try again.


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×