Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 37cf835

Browse files
committed
security: User Ticket Creation
This addresses an issue with Topic ID param abuse on User Ticket Creation via portal.
1 parent c4ad48d commit 37cf835

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

include/class.ticket.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4237,7 +4237,8 @@ static function create($vars, &$errors, $origin, $autorespond=true,
42374237
$errors += $form->errors();
42384238

42394239
if ($vars['topicId']) {
4240-
if (($topic=Topic::lookup($vars['topicId']))
4240+
if (is_numeric($vars['topicId'])
4241+
&& ($topic=Topic::lookup((int) $vars['topicId']))
42414242
&& $topic->isActive()) {
42424243
foreach ($topic_forms as $topic_form) {
42434244
$TF = $topic_form->getForm($vars);

0 commit comments

Comments
 (0)