Commit 6fa09fe2 authored by Guinness's avatar Guinness
Browse files

Merge branch 'preprod' into 'master'

Do not allow access to piplome if not connected.

See merge request !112
parents 6c995c71 571263c9
......@@ -22,6 +22,9 @@ class Cron extends Controller
{
// This method is used to generate a piplome. It might be called with an
// id parameters, in which case we will ask to regenerate a specific piplome.
if (!$f3->exists('SESSION.user')) {
$f3->reroute('/login');
}
$logger = new \Log("/piplome.log");
$ids = array();
$db = $f3->get('DB');
......
......@@ -45,10 +45,10 @@ $f3->set('ONERROR', function ($f3) {
// If neither error or message are set, define them
if (!$f3->exists('SESSION.message')) {
$f3->push('SESSION.message', '');
$f3->push('SESSION.message', []);
}
if (!$f3->exists('SESSION.error')) {
$f3->push('SESSION.error', '');
$f3->push('SESSION.error', []);
}
$f3->get('container')['session']->set('csrf', $csrf);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment