Sanitize state input in Stations model

Added xss_clean sanitization to 'station_ca_state' and 'station_state' POST inputs to enhance security and prevent XSS vulnerabilities when handling state data.
这个提交包含在:
Peter Goodhall 2025-08-02 11:04:59 +01:00
父节点 f502de6338
当前提交 11673494ef

查看文件

@ -77,9 +77,9 @@ class Stations extends CI_Model {
// Check if the state is Canada and get the correct state // Check if the state is Canada and get the correct state
if ($this->input->post('dxcc') == 1 && $this->input->post('station_ca_state') !="") { if ($this->input->post('dxcc') == 1 && $this->input->post('station_ca_state') !="") {
$state = $this->input->post('station_ca_state'); $state = xss_clean($this->input->post('station_ca_state', true));
} else { } else {
$state = $this->input->post('station_state'); $state = xss_clean($this->input->post('station_state', true));
} }
// Create data array with field values // Create data array with field values
@ -131,9 +131,9 @@ class Stations extends CI_Model {
// Check if the state is Canada and get the correct state // Check if the state is Canada and get the correct state
if ($this->input->post('dxcc') == 1 && $this->input->post('station_ca_state') !="") { if ($this->input->post('dxcc') == 1 && $this->input->post('station_ca_state') !="") {
$state = $this->input->post('station_ca_state'); $state = xss_clean($this->input->post('station_ca_state', true));
} else { } else {
$state = $this->input->post('station_state'); $state = xss_clean($this->input->post('station_state', true));
} }
$data = array( $data = array(