mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
Merge branch 'ent-5958-xss-event-view' into 'develop'
fixed vulnerabilty on events comments See merge request artica/pandorafms!3287
This commit is contained in:
commit
aaa1ae6650
@ -1088,10 +1088,18 @@ if ($dialogue_event_response) {
|
||||
}
|
||||
|
||||
if ($add_comment) {
|
||||
$aviability_comment = true;
|
||||
$comment = get_parameter('comment');
|
||||
if (preg_match('<script>', io_safe_output($comment))) {
|
||||
$aviability_comment = false;
|
||||
$return = false;
|
||||
}
|
||||
|
||||
$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) {
|
||||
echo 'comment_ok';
|
||||
|
Loading…
x
Reference in New Issue
Block a user