Merge pull request #2355 from int2001/welcome_fix

protect DANGEROUS Functions from being called without authed user
pull/2356/head
Andreas Kristiansen 2023-08-01 13:26:37 +02:00 zatwierdzone przez GitHub
commit 25e62a2708
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 8 dodań i 3 usunięć

Wyświetl plik

@ -8,9 +8,14 @@
class Welcome extends CI_Controller {
function __construct() {
parent::__construct();
public function index()
{
$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'); }
}
public function index() {
if($this->optionslib->get_option('version2_trigger') == "false") {
$data['page_title'] = "Welcome to Cloudlog Version 2.0";
@ -96,4 +101,4 @@ class Welcome extends CI_Controller {
echo "Error claiming API Keys during Migration. See Logs for further information";
}
}
}
}