Software Development, Technical Support & Systems Integration Specialists

Dating Software Solutions & Database Customizations

Preventative Maintenance - Administrative Tools - SEO Consultations



Welcome to AllAboutDatingSites - aeDating & Dolphin Dating Technical Solutions. We hope your visit with us will enable you to make better informed decisions about enhancing and managing your Dating Site or Social Networking business.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other great features including our Technical Articles, Tips & Tricks and other valuable Content. By joining our FREE community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely FREE. So, PLEASE do something good for yourself. Join our community today! You will be glad you did. By the way, did we forget to mention, this site will save you a pile of$$$ ABSOLUTELY!

If you have any problems with the registration process or your account login, please feel free to contact us.

Go Back   AllAboutDatingSites - aeDating & Dolphin Dating Technical Solutions > AEDating - I have Lots to See for FREE > All Database Related Issues
Portal Register Blogs FAQDonate Calendar Search Today's Posts Mark Forums Read

Notices

All Database Related Issues All topics relative to database issues are welcome here, comments, issues, and suggestions

Reply
 
Submit Tools Thread Tools Display Modes
Old 03-04-2008, 05:09 AM   #1
administrator
Administrator
 
administrator's Avatar
 
Join Date: Nov 2006
Posts: 92
Blog Entries: 9
Error in /article_view.php:

I am still running aeDating 4.1 on some of my dating sites and here is an unfriendly reminder from a spammer that the data isn't filtered as well as it ought to be:


Error in /article_view.php: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server
version for the right syntax to use near '://www.cjp.spb.ru/en/tis/leboma/' at line 1
Query: 'SELECT * FROM `Articles` WHERE `ID` =
Code:
 Content visible to registered members only. Please Click Here To Register
'


This is probably an injection attack candidate as well because it can be accessed directly by a badguy.

One way to fix it is to add a filter trap like the following:

Find in article_views the line:

$article_arr = db_arr( "SELECT * FROM `Articles` WHERE `ID` = $article" );


Just before it add:


if ( !empty( $_GET['article'] ))
{

$pattern ="/(http:\/\/|ftp:\/\/|https:\/\/|www|\[url=)[^\s]+\.(com|co|org|net|info|gov|biz|[a-z]{2}|[a-z]{4}|[a-z]{3})(\.[a-z]{2})*(\/[a-zA-Z0-9]*)*|select|insert|update|delete|drop|alter|create /";

if ( preg_match($pattern, $_GET['article']))
{
mail("your@email.com"," ***** Hacker-Spammer-Scraper Attempt ***** ", " From IP address : " . $_SERVER['REMOTE_ADDR'] . " User Agent: " . $_SERVER['HTTP_USER_AGENT'] . " on the file: " . $_SERVER["SCRIPT_NAME"]);
exit("add your greeting for the spammer");

}
}



This MOD will reject any attempt to add a link to the article_view reqest form. It also sends you an email with the badguy's IP address and information about the browser he was using to submit the bad request so you can add the badguy to your blocklist if you have one.

In addition, the pattern test will block submissions requesting a basic set of SQL commands to help prevent an SQL injection attack.

You could use this same code to filter input from almost any input form on aeDating or some variation of it. Notice that this is a $_GET request. This block would work on $_POST requests as well.


Enjoy!
administrator is offline   Reply With Quote
Reply
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT. The time now is 11:09 AM.

www.AllAboutDatingSites.com RSS Feeds - Contact Us - www.AllAboutDatingSites.com - Archive - Privacy Statement - Terms of Service - Top

== Site Tool Acknowledgements ==

style By: Miner Skinz.com
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright ©2008 AllAboutDatingSites - Dating Software Support Specialists - All rights reserved.