Add session verification to error log flushing.

This commit is contained in:
Aaron committed 2017-11-09 17:00:34 +01:00
1 parent 196fe6780c
commit 02752798a9
1 file changed
+7 -2
+7 -2
View File
@@ -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' => [