Log in

View Full Version : CSRF Protection ???


MyPornLife.info
10-01-2009, 08:30 AM
Hey.
i created a form like this
<form name="form1" method="post" enctype="multipart/form-data" action="post.php">
<input type="text" name="title" id="title" size="24">
<input type="submit" value="Submit data">
<input type="reset" value="Reset">
</form>

this is the post.php file
<?php

error_reporting(E_ALL & ~E_NOTICE);

define('THIS_SCRIPT', 'post');
define('CSRF_PROTECTION', true);

require_once('./global.php');

$title = $vbulletin->input->clean_gpc('r', 'title', TYPE_STR);

echo $title;
?>

but when i complete the form & click on submit button it shows me:
Your submission could not be processed because a security token was missing.

If this occurred unexpectedly, please inform the administrator and describe the action you performed before you received this error.

im sure this is bcoz of the line define('CSRF_PROTECTION', true); in post.php

what should i do now? remove that line? actually what is that line for? or is there any way to solve it without removing that line ??

plz help me

--------------- Added 1254404112 at 1254404112 ---------------

never mind i've found it here: https://vborg.vbsupport.ru/showthread.php?t=177013