Enable filtering in addcomment.php
This commit is contained in:
@@ -14,16 +14,10 @@
|
|||||||
// application environment
|
// application environment
|
||||||
include("path.php");
|
include("path.php");
|
||||||
require(BASE."include/incl.php");
|
require(BASE."include/incl.php");
|
||||||
|
require(BASE."include/filter.php");
|
||||||
require(BASE."include/application.php");
|
require(BASE."include/application.php");
|
||||||
require(BASE."include/mail.php");
|
require(BASE."include/mail.php");
|
||||||
|
|
||||||
$aClean = array(); //array of filtered user input
|
|
||||||
|
|
||||||
$aClean['iVersionId'] = makeSafe($_REQUEST['iVersionId']);
|
|
||||||
$aClean['iThread'] = makeSafe($_REQUEST['iThread']);
|
|
||||||
$aClean['sBody'] = makeSafe($_REQUEST['sBody']);
|
|
||||||
$aClean['sSubject'] = makeSafe($_REQUEST['sSubject']);
|
|
||||||
|
|
||||||
// you must be logged in to submit comments
|
// you must be logged in to submit comments
|
||||||
if(!$_SESSION['current']->isLoggedIn())
|
if(!$_SESSION['current']->isLoggedIn())
|
||||||
{
|
{
|
||||||
@@ -32,14 +26,6 @@ if(!$_SESSION['current']->isLoggedIn())
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !is_numeric($aClean['iVersionId']) )
|
|
||||||
util_show_error_page_and_exit('Internal Database Access Error');
|
|
||||||
|
|
||||||
if(!is_numeric($aClean['iThread']))
|
|
||||||
{
|
|
||||||
$aClean['iThread'] = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// the user submitted his comment
|
// the user submitted his comment
|
||||||
if(!empty($aClean['sBody']))
|
if(!empty($aClean['sBody']))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user