forked from Public/pics
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();
|
throw new NotAllowedException();
|
||||||
|
|
||||||
// Flushing, are we?
|
// Flushing, are we?
|
||||||
if (isset($_POST['flush']))
|
if (isset($_POST['flush']) && Session::validateSession('get'))
|
||||||
|
{
|
||||||
ErrorLog::flush();
|
ErrorLog::flush();
|
||||||
|
header('Location: ' . BASEURL . '/manageerrors/');
|
||||||
|
}
|
||||||
|
|
||||||
|
Session::resetSessionToken();
|
||||||
|
|
||||||
$options = [
|
$options = [
|
||||||
'title' => 'Error log',
|
'title' => 'Error log',
|
||||||
'form' => [
|
'form' => [
|
||||||
'action' => BASEURL . '/manageerrors/',
|
'action' => BASEURL . '/manageerrors/?' . Session::getSessionTokenKey() . '=' . Session::getSessionToken(),
|
||||||
'method' => 'post',
|
'method' => 'post',
|
||||||
'class' => 'floatright',
|
'class' => 'floatright',
|
||||||
'buttons' => [
|
'buttons' => [
|
||||||
|
Loading…
Reference in New Issue
Block a user