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
https://forums.phpfreaks.com/topic/91646-security-of-a-simple-shoutbox/
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.........

 

 

Archived

This topic is now archived and is closed to further replies.

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