Update new_ticket.php

Prevent cross site scripting
pull/5904/head
DamienLyon 10 months ago committed by GitHub
parent 5ee64f97c7
commit 3ecda114c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      public/main/ticket/new_ticket.php

@ -24,7 +24,7 @@ function updateCourseList(sessionId) {
}, function (courseList) {
$("<option>", {
value: 0,
text: "'.get_lang('Select').'"
text: '.json_encode(get_lang('Select')).'
}).appendTo($selectCourse);
if (courseList.length > 0) {
@ -141,9 +141,9 @@ function save_ticket()
$category_id = isset($_POST['category_id']) ? (int) $_POST['category_id'] : '';
$project_id = (int) $_POST['project_id'];
$subject = $_POST['subject'];
$subject = Security::remove_XSS($_POST['subject']);
$other_area = (int) $_POST['other_area'];
$personal_email = $_POST['personal_email'];
$personal_email = Security::remove_XSS($_POST['personal_email']);
$source = (int) $_POST['source_id'];
$user_id = isset($_POST['user_id']) ? (int) $_POST['user_id'] : null;
$priority = isset($_POST['priority_id']) ? (int) $_POST['priority_id'] : '';

Loading…
Cancel
Save