admin skips input validation
This commit is contained in:
parent
e61031f5b2
commit
e61df38f90
14
comments.php
14
comments.php
@ -89,6 +89,12 @@
|
|||||||
|
|
||||||
$errors = array();
|
$errors = array();
|
||||||
|
|
||||||
|
$loggedin = false;
|
||||||
|
|
||||||
|
if (user_loggedin()) {
|
||||||
|
$loggedin = $arr['loggedin']=true;
|
||||||
|
} else {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* check name
|
* check name
|
||||||
*
|
*
|
||||||
@ -127,10 +133,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (!$content) {
|
if (!$content) {
|
||||||
$errors['content'] = $lerr['comment'];
|
$errors['content'] = $lerr['comment'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($errors) {
|
if ($errors) {
|
||||||
$smarty->assign('error', $errors);
|
$smarty->assign('error', $errors);
|
||||||
return false;
|
return false;
|
||||||
@ -139,11 +148,6 @@
|
|||||||
$arr['version'] = system_ver();
|
$arr['version'] = system_ver();
|
||||||
$arr['name'] = $_POST['name'];
|
$arr['name'] = $_POST['name'];
|
||||||
|
|
||||||
$loggedin = false;
|
|
||||||
|
|
||||||
if (user_loggedin()) {
|
|
||||||
$loggedin = $arr['loggedin']=true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$loggedin)
|
if (!$loggedin)
|
||||||
setcookie('comment_author_' . COOKIEHASH,
|
setcookie('comment_author_' . COOKIEHASH,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user