Merge pull request #21 from int2001/flef

Added xss_clean and null-exception-handling to grid
pull/2669/head
HB9HIL 2023-11-10 09:30:55 +01:00 zatwierdzone przez GitHub
commit 8cfb5e71f1
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -289,10 +289,10 @@ class Logbook_model extends CI_Model {
}
// Decide whether its single gridsquare or a multi which makes it vucc_grids
if (strpos(trim($this->input->post('locator')), ',') !== false) {
$data['COL_VUCC_GRIDS'] = strtoupper(trim($this->input->post('locator')));
if (strpos(trim(xss_clean($this->input->post('locator')) ?? ''), ',') !== false) {
$data['COL_VUCC_GRIDS'] = strtoupper(trim(xss_clean($this->input->post('locator')) ?? ''));
} else {
$data['COL_GRIDSQUARE'] = strtoupper(trim($this->input->post('locator')));
$data['COL_GRIDSQUARE'] = strtoupper(trim(xss_clean($this->input->post('locator')) ?? ''));
}
// if eQSL username set, default SENT & RCVD to 'N' else leave as null