Merge pull request #5 from phl0/disallowUnauthorizedAccess

If no API key is supplied we should check for a valid session and otherwise just redirect to login.
pull/2103/head
Andreas Kristiansen 2023-05-02 08:18:20 +02:00 zatwierdzone przez GitHub
commit f4409204a9
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -21,6 +21,11 @@ class Backup extends CI_Controller {
/* Gets all QSOs and Dumps them to logbook.adi */
public function adif($key = null){
if ($key == null) {
$this->load->model('user_model');
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
}
$this->load->helper('file');
// Set memory limit to unlimited to allow heavy usage
ini_set('memory_limit', '-1');
@ -74,4 +79,4 @@ class Backup extends CI_Controller {
}
}
/* End of file Backup.php */
/* End of file Backup.php */