Go Back   EQEmulator Home > EQEmulator Forums > General > General::General Discussion

General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics.
Do not post support topics here.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 10-14-2009, 07:34 PM
airtalking
Fire Beetle
 
Join Date: Oct 2008
Location: bleh
Posts: 18
Default

I guess i could explain further... say you got

Code:
$name = $_POST['name'];
$sql = "SELECT * FROM table WHERE name = '$name';
if a user submits his name as (forgive my syntax on droping i know its wrong)
Code:
blahblahblah'; DROP ALL TABLES;--
then when it gets plugged into $sql you would get
Code:
SELECT * FROM table WHERE name = 'blahblahblah'; DROP ALL TABLES;--'
the -- at the end would comment out the trailing quote. If magic quotes is on, or you use the code in the first post it will add a / before any quote or /. So with magic quotes on you would get
Code:
SELECT * FROM table WHERE name = 'blahblahblah/'; DROP ALL TABLES;--'
That would cause an error and none of the sql gets executes saving your database.

I don't mean any harm to anyones database by posting this, i'm only posting it cause there is a work around, or so you can take the tool down if you are worried. Probably everyone will find that they aren't vulnerable since its default behavior, but need to be aware that when PHP6 comes out that magic quotes will be no longer there as far as i know. As far as I know the code up top will still work in php6.

Sometime in the next few week or next month I will be rewriting the tool from the ground up and including it in magelo with a good ammount of security on it. Sorry it will be slow to get out, i'm changing alot of core features of the magelo clone and want to really test it well.
Reply With Quote
 


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 -4. The time now is 11:01 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3