feat: release SysMVC 2.0 with enhanced CSRF protection and UI improvements
Major version upgrade from 1.0.0 to 2.0.0 including copyright year updates, website URL migration to syspanel.com.br, and comprehensive CSRF token handling improvements. The Twig csrf() helper now returns a complete hidden input field instead of a raw token value, and token generation is now automatic when empty. Session initialization has been centralized in BaseController, and child controllers now properly call parent constructors. CRUD views have been modernized with flexbox layouts and consistent CSRF rendering. Documentation has been expanded with features, requirements, and project structure sections, and donation sections have been added across all pages.
This commit is contained in:
@@ -19,6 +19,7 @@ class TwigExampleController extends BaseController
|
||||
|
||||
public function __construct(Environment $twig, Logger $logger, BladeOne $blade)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->twig = $twig;
|
||||
$this->logger = $logger;
|
||||
$this->blade = $blade;
|
||||
@@ -53,7 +54,7 @@ class TwigExampleController extends BaseController
|
||||
{
|
||||
try {
|
||||
$this->logger->info('Displaying the creation page of the TwigExampleController.');
|
||||
return $this->twig->render('twigexample/create.twig.php', ['csrf_token' => htmlspecialchars(getCsrfToken(), ENT_QUOTES, 'UTF-8')]);
|
||||
return $this->twig->render('twigexample/create.twig.php');
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error('Error displaying the creation page: ' . $e->getMessage());
|
||||
return 'Error displaying the creation page: ' . $e->getMessage();
|
||||
@@ -73,7 +74,7 @@ class TwigExampleController extends BaseController
|
||||
$twigexample = Sanitizer::sanitizeOutput($twigexample->toArray());
|
||||
|
||||
$this->logger->info("Displaying the edit page for the record with ID: $id.");
|
||||
return $this->twig->render('twigexample/edit.twig.php', ['twigexample' => $twigexample, 'csrf_token' => htmlspecialchars(getCsrfToken(), ENT_QUOTES, 'UTF-8')]);
|
||||
return $this->twig->render('twigexample/edit.twig.php', ['twigexample' => $twigexample]);
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error('Error displaying the edit page: ' . $e->getMessage());
|
||||
return 'Error displaying the edit page: ' . $e->getMessage();
|
||||
|
||||
Reference in New Issue
Block a user