Skip to content

Commit

Permalink
Fix reflected XSS vulnerability
Browse files Browse the repository at this point in the history
  • Loading branch information
jekkos committed Sep 28, 2021
1 parent 6ef764d commit 2b031e6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions application/controllers/Messages.php
Expand Up @@ -37,11 +37,11 @@ public function send()

if($response)
{
echo json_encode(array('success' => TRUE, 'message' => $this->lang->line('messages_successfully_sent') . ' ' . $phone));
echo json_encode(array('success' => TRUE, 'message' => $this->lang->line('messages_successfully_sent') . ' ' . $this->xss_clean($phone)));
}
else
{
echo json_encode(array('success' => FALSE, 'message' => $this->lang->line('messages_unsuccessfully_sent') . ' ' . $phone));
echo json_encode(array('success' => FALSE, 'message' => $this->lang->line('messages_unsuccessfully_sent') . ' ' . $this->xss_clean($phone)));
}
}

Expand All @@ -54,11 +54,11 @@ public function send_form($person_id = -1)

if($response)
{
echo json_encode(array('success' => TRUE, 'message' => $this->lang->line('messages_successfully_sent') . ' ' . $phone, 'person_id' => $this->xss_clean($person_id)));
echo json_encode(array('success' => TRUE, 'message' => $this->lang->line('messages_successfully_sent') . ' ' . $this->xss_clean($phone), 'person_id' => $this->xss_clean($person_id)));
}
else
{
echo json_encode(array('success' => FALSE, 'message' => $this->lang->line('messages_unsuccessfully_sent') . ' ' . $phone, 'person_id' => -1));
echo json_encode(array('success' => FALSE, 'message' => $this->lang->line('messages_unsuccessfully_sent') . ' ' . $this->xss_clean($phone), 'person_id' => -1));
}
}
}
Expand Down

0 comments on commit 2b031e6

Please sign in to comment.