Jump to content

Security of a Simple Shoutbox


jonoc33

Recommended Posts

Hi everyone,

Recently someone got behind my mysql_real_escape_string of POST data and screwed my site over using a simple mysql shoutbox I made. I seriously do not know how but i'm presuming he used Perl or some sort to manipulate the form.

 

Is there any way I can stop this sort of thing from happening?

 

Code:

<?

include("../include/db.php");

$author =  $_POST['author'];
$message =  mysql_real_escape_string("".$_POST['message']."");

$sql = mysql_query("INSERT INTO shoutbox (message, author) VALUES ('".$message."','".$author."')");

$rs = $sql or die ("Problem with the query: <br>".mysql_error());

header("Location: ../index.php");

?>

Link to comment
Share on other sites

only let users use the shout box if there a member off the website..........

 

any user commenting take all there deatals id username time_added ect ect ect

 

create a flood protection system let users only post within a time limit and

limit there posting daily.........

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.