mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
xss clean of postdata
This commit is contained in:
@@ -5,6 +5,9 @@ class Distances_model extends CI_Model
|
||||
{
|
||||
|
||||
function get_distances($postdata, $measurement_base) {
|
||||
|
||||
$clean_postdata = $this->security->xss_clean($postdata);
|
||||
|
||||
$this->load->model('logbooks_model');
|
||||
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
|
||||
@@ -27,20 +30,20 @@ class Distances_model extends CI_Model
|
||||
$this->db->join('satellite', 'satellite.name = '.$this->config->item('table_name').'.COL_SAT_NAME', 'left outer');
|
||||
$this->db->where('LENGTH(col_gridsquare) >', 0);
|
||||
|
||||
if ($postdata['band'] != 'All') {
|
||||
if ($postdata['band'] == 'sat') {
|
||||
$this->db->where('col_prop_mode', $postdata['band']);
|
||||
if ($postdata['sat'] != 'All') {
|
||||
$this->db->where('col_sat_name', $postdata['sat']);
|
||||
if ($clean_postdata['band'] != 'All') {
|
||||
if ($clean_postdata['band'] == 'sat') {
|
||||
$this->db->where('col_prop_mode', $clean_postdata['band']);
|
||||
if ($clean_postdata['sat'] != 'All') {
|
||||
$this->db->where('col_sat_name', $clean_postdata['sat']);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$this->db->where('col_band', $postdata['band']);
|
||||
$this->db->where('col_band', $clean_postdata['band']);
|
||||
}
|
||||
}
|
||||
|
||||
if ($postdata['orbit'] != 'All') {
|
||||
$this->db->where('satellite.orbit', $postdata['orbit']);
|
||||
if ($clean_postdata['orbit'] != 'All') {
|
||||
$this->db->where('satellite.orbit', $clean_postdata['orbit']);
|
||||
}
|
||||
|
||||
$this->db->where('station_id', $station_id);
|
||||
|
||||
Reference in New Issue
Block a user