1
0
mirror of https://github.com/typemill/typemill.git synced 2025-07-31 19:30:40 +02:00

Version 1.4.6: Change content, CSRF-notification, fix blox editor, alert for raw editor, cyanine optimizations

This commit is contained in:
trendschau
2021-06-03 13:33:12 +02:00
parent 156e2c6951
commit 14ea7c7995
22 changed files with 299 additions and 110 deletions

View File

@@ -19,8 +19,14 @@ class RestrictApiAccess
{
if(!isset($_SESSION['login']) || !isset($_SESSION['role']))
{
return $response->withJson(['errors' => ['access denied']], 403);
return $response->withJson(['data' => false, 'errors' => ['message' => 'You are probably logged out. Please login and try again.']], 403);
}
# check csrf protection
if( $request->getattribute('csrf_result') === false )
{
return $response->withJson(array('data' => false, 'errors' => ['message' => 'The form has a timeout. Please reload the page and try again.']), 403);
}
return $next($request, $response);
}
}