Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

NEW: Anti Robot Registration Validation


Druide

Recommended Posts

Faiz, which version are you using? v2.5 or v2.6?

 

Lee, in each page you applied this contribution, the code below actually do the input checking.

// BOF Anti Robotic Registration v2.5
if (ACCOUNT_VALIDATION == 'true' && ACCOUNT_CREATE_VALIDATION == 'true') {
  $sql = "SELECT * FROM " . TABLE_ANTI_ROBOT_REGISTRATION . " WHERE session_id = '" . tep_session_id() . "' LIMIT 1";
  if( !$result = tep_db_query($sql) ) {
	$error = true;
	$entry_antirobotreg_error = true;
	$text_antirobotreg_error = ERROR_VALIDATION_1;
  } else {
	$entry_antirobotreg_error = false;
	$anti_robot_row = tep_db_fetch_array($result);
	if (( strtoupper($HTTP_POST_VARS['antirobotreg']) != $anti_robot_row['reg_key'] ) || ($anti_robot_row['reg_key'] == '') || (strlen($antirobotreg) != ENTRY_VALIDATION_LENGTH)) {
	  $error = true;
	  $entry_antirobotreg_error = true;
	  $text_antirobotreg_error = ERROR_VALIDATION_2;
	} else {
	  $sql = "DELETE FROM " . TABLE_ANTI_ROBOT_REGISTRATION . " WHERE session_id = '" . tep_session_id() . "'";
	  if( !$result = tep_db_query($sql) ) {
		$error = true;
		$entry_antirobotreg_error = true;
		$text_antirobotreg_error = ERROR_VALIDATION_3;
	  } else {
		$sql = "OPTIMIZE TABLE " . TABLE_ANTI_ROBOT_REGISTRATION . "";
		if( !$result = tep_db_query($sql) ) {
		  $error = true;
		  $entry_antirobotreg_error = true;
		  $text_antirobotreg_error = ERROR_VALIDATION_4;
		} else {
		  $entry_antirobotreg_error = false;
		}
	  }
	}
  }
  if ($entry_antirobotreg_error == true) $messageStack->add('create_account', $text_antirobotreg_error);
}
// EOF Anti Robotic Registration v2.5

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

Lee, in each page you applied this contribution, the code below actually do the input checking.

 

 

okay thanks! I'm trying to make a slight mod to it.

Thanks

Link to comment
Share on other sites

hmmm I seem to be having some trouble. I've not changed anything from what the contrib files say yet.. just thought I'd checkthe validation first and it works fine on create new account, but for some reason on change password it never validates and the same on the contact page...

I've not got it set on editing the profile so I don't know if it works there or not....

Link to comment
Share on other sites

hmmm I seem to be having some trouble. I've not changed anything from what the contrib files say yet.. just thought I'd checkthe validation first and it works fine on create new account, but for some reason on change password it never validates and the same on the contact page...

I've not got it set on editing the profile so I don't know if it works there or not....

Link to comment
Share on other sites

Faiz, which version are you using? v2.5 or v2.6?

 

I'm using OsCommerce 2.2 MS2 and the mod 2.6 version. How can i solve this AlexStudio? :-" :rolleyes:

 

Thanks.

"I am not a Newbie but I am not an Expert either..."
"Lets learn about osCommerce together!..."
Link to comment
Share on other sites

There are settings in admin need to be turn on to enable the validation in additional pages.

 

Here is a suggestion for v2.6 to use truetype font. It's the answer to your problem too.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

Here is a suggestion for v2.6 to use truetype font. It's the answer to your problem too.

 

Thanks alex.. Just now, I manage to get the code appear by using PHP bitmap font. It work perfectly :) :thumbsup: :rolleyes:

"I am not a Newbie but I am not an Expert either..."
"Lets learn about osCommerce together!..."
Link to comment
Share on other sites

There are settings in admin need to be turn on to enable the validation in additional pages.

Yeah I've got it set to show and it does display the validation image captcha. Just every time I type in the code I get the incorrect code message...

When I know that it's right.

It works fine on the account creation page though.

Link to comment
Share on other sites

I installed osCommerce 2.2 Milestone 2 Update 060817

 

and

 

Anti-Robot Registration Validation v2.6 - Updated Admin. Image and Text Control

 

but the Anti-Robot Registration Validation picture appeared so small that I cannot read.

 

The screen shot of the validation is as follows

 

http://www.mypic.us.to/out.php/i149_valid.GIF

 

i149_valid.GIF

 

Please help me

 

Thanks,

Bhaskar

Link to comment
Share on other sites

I installed osCommerce 2.2 Milestone 2 Update 060817

 

and

 

Anti-Robot Registration Validation v2.6 - Updated Admin. Image and Text Control

 

but the Anti-Robot Registration Validation picture appeared so small that I cannot read.

 

The screen shot of the validation is as follows

 

http://www.mypic.us.to/out.php/i149_valid.GIF

 

i149_valid.GIF

 

Please help me

 

Thanks,

Bhaskar

 

take a look at this topic.

http://www.oscommerce.com/forums/index.php?sho...4205&st=288

Link to comment
Share on other sites

There are settings in admin for adjusting the image/font size. If you can't find them, probably the v2.6 sql script has not been executed.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

  • 2 weeks later...
Excellent. Thanks for all your help here.

For those that are using imagemagic just point the code to your existing fonts folder:

putenv('GDFONTPATH=' . DIR_FS_CATALOG . 'includes/imagemagic/fonts/');

 

Works like a champ.

 

Please note that fonts should be uploaded in binary mode

Rose

The strong survive BUT the best succeed !!

1064 - You have an error in your SQL syntax

Link to comment
Share on other sites

first of all ,,, thnx for this contri .... is had a lot of different types of this kind of contri but this one is perfect.

BUT, when i install this one the confirmation code doesnt appear, there are no error messages. So i dont know where to find it.

 

thnx for youre help anyways

Link to comment
Share on other sites

The confirmation code should be on the contact_us page. The actual page which is used to generate the code is the validation_png.php file which is in catalog/validation_png.php . You also need to make sure that in the admin section the "Activate Validation" is set to true.

and you need to set it to true for the setting which says 'activate for contact_us'.

 

If you still have problems we can do this the long way round - you can email me and I'll try my best to help you.

 

 

rgds

rose

Rose

The strong survive BUT the best succeed !!

1064 - You have an error in your SQL syntax

Link to comment
Share on other sites

  • 4 weeks later...

I have the CONFIG_CALCULATE_IMAGE_SIZE=='true' issue but I must have it set true... has anyone found any knock-on effect problems after installing the posted fix for this, there has not been anything more said about this yet and was wondering whats other thought ?

Link to comment
Share on other sites

after playing about I found a quick fix for my CONFIG_CALCULATE_IMAGE_SIZE=='true' issue

 

Changed:

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

 

To:

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

 

I saw sizes in the admin so i'm quite sure the height and width could be extracted from there (it should be!)

but I will leave that up to the better PHP coders :blush:

Edited by PerlSOL
Link to comment
Share on other sites

Yeah I've got it set to show and it does display the validation image captcha. Just every time I type in the code I get the incorrect code message...

When I know that it's right.

It works fine on the account creation page though.

 

 

did you find out why after? it might help me...

I had mine working at one stage then I went and sorted out the register globals issue (which I left till last) and now I have this problem where I enter the correct code but it keeps saying Invalid Validation Code. I am close to removing this MOD as it is taking far too much time to try and solve, I cant revert and undo what I have done as I need the register globals off.

Im sure is was to do with sessions.php but i'm only learning!!!

 

 

PLEASE, PLEASE, PLEASE, can anyone help me

Link to comment
Share on other sites

|| (strlen($antirobotreg) != ENTRY_VALIDATION_LENGTH) :angry:

 

after much time I found that if I removed the above it worked, from what I can work out it is pointless anyhow with the compare check.

TFFT!

 

I hope this helps others from banging one's head :blink:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...