Add session verification to error log flushing.
This commit is contained in:
parent
196fe6780c
commit
02752798a9
@ -15,13 +15,18 @@ class ManageErrors extends HTMLController
|
||||
throw new NotAllowedException();
|
||||
|
||||
// Flushing, are we?
|
||||
if (isset($_POST['flush']))
|
||||
if (isset($_POST['flush']) && Session::validateSession('get'))
|
||||
{
|
||||
ErrorLog::flush();
|
||||
header('Location: ' . BASEURL . '/manageerrors/');
|
||||
}
|
||||
|
||||
Session::resetSessionToken();
|
||||
|
||||
$options = [
|
||||
'title' => 'Error log',
|
||||
'form' => [
|
||||
'action' => BASEURL . '/manageerrors/',
|
||||
'action' => BASEURL . '/manageerrors/?' . Session::getSessionTokenKey() . '=' . Session::getSessionToken(),
|
||||
'method' => 'post',
|
||||
'class' => 'floatright',
|
||||
'buttons' => [
|
||||
|
Loading…
Reference in New Issue
Block a user