fixed vulnerabilty on events comments
This commit is contained in:
parent
25dee1c906
commit
93bc14d102
|
@ -1088,10 +1088,18 @@ if ($dialogue_event_response) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($add_comment) {
|
if ($add_comment) {
|
||||||
|
$aviability_comment = true;
|
||||||
$comment = get_parameter('comment');
|
$comment = get_parameter('comment');
|
||||||
|
if (preg_match('<script>', io_safe_output($comment))) {
|
||||||
|
$aviability_comment = false;
|
||||||
|
$return = false;
|
||||||
|
}
|
||||||
|
|
||||||
$event_id = get_parameter('event_id');
|
$event_id = get_parameter('event_id');
|
||||||
|
|
||||||
$return = events_comment($event_id, $comment, 'Added comment', $meta, $history);
|
if ($aviability_comment !== false) {
|
||||||
|
$return = events_comment($event_id, $comment, 'Added comment', $meta, $history);
|
||||||
|
}
|
||||||
|
|
||||||
if ($return) {
|
if ($return) {
|
||||||
echo 'comment_ok';
|
echo 'comment_ok';
|
||||||
|
|
Loading…
Reference in New Issue