security: add CSRF protection and harden core handling
Add CSRF token validation and include tokens in authentication, website manager, and GrapesJS forms and requests. Harden login with password hash verification and session ID regeneration, validate database identifiers and charset, and secure upload MIME detection and filename generation. Update nullable type declarations and PHP syntax across core contracts and modules, switch the Docker image to PHP 8.4, and move the theme script asset to the end of the page. Refresh the PageBuilderBody distribution assets.
This commit is contained in:
@@ -68,7 +68,7 @@ class BlockRenderer
|
||||
* @param null $id id of the specific block instance
|
||||
* @return string
|
||||
*/
|
||||
public function renderWithSlug(string $blockSlug, $blockData = null, $id = null)
|
||||
public function renderWithSlug(string $blockSlug, ?array $blockData = null, ?string $id = null)
|
||||
{
|
||||
$block = ($path = Extensions::getBlock($blockSlug))
|
||||
? new ThemeBlock($this->theme, $path, true, $blockSlug)
|
||||
@@ -85,7 +85,7 @@ class BlockRenderer
|
||||
* @param null $id id of the specific block instance
|
||||
* @return string
|
||||
*/
|
||||
public function render(ThemeBlock $themeBlock, $blockData = null, $id = null)
|
||||
public function render(ThemeBlock $themeBlock, ?array $blockData = null, ?string $id = null)
|
||||
{
|
||||
$blockData = $blockData ?? [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user