mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-12-03 05:41:52 +09:00
Merge pull request #4 from arjunshibu/master
Security fix for XSS in ticket create/reply for admin
This commit is contained in:
commit
2b25b215a9
1 file changed
+4
@@ -137,6 +137,8 @@ class Admin extends \Api_Abstract
|
||||
);
|
||||
$this->di['validator']->checkRequiredParamsForArray($required, $data);
|
||||
|
||||
$data['content'] = preg_replace('/javascript:\/\/|\%0(d|a)/i', '', $data['content']);
|
||||
|
||||
$ticket = $this->di['db']->getExistingModelById('SupportTicket', $data['id'], 'Ticket not found');
|
||||
|
||||
return $this->getService()->ticketReply($ticket, $this->getIdentity(), $data['content']);
|
||||
@@ -188,6 +190,8 @@ class Admin extends \Api_Abstract
|
||||
);
|
||||
$this->di['validator']->checkRequiredParamsForArray($required, $data);
|
||||
|
||||
$data['content'] = preg_replace('/javascript:\/\/|\%0(d|a)/i', '', $data['content']);
|
||||
|
||||
$client = $this->di['db']->getExistingModelById('Client', $data['client_id'], 'Client not found');
|
||||
$helpdesk = $this->di['db']->getExistingModelById('SupportHelpdesk', $data['support_helpdesk_id'], 'Helpdesk invalid');
|
||||
|
||||
|
||||
Reference in new issue
Block a user