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:
@@ -59,7 +59,7 @@ class PageBuilder implements PageBuilderContract
|
||||
* @return bool
|
||||
* @throws Exception
|
||||
*/
|
||||
public function handleRequest($route, $action, PageContract $page = null)
|
||||
public function handleRequest($route, $action, ?PageContract $page = null)
|
||||
{
|
||||
phpb_set_in_editmode();
|
||||
|
||||
@@ -377,7 +377,7 @@ class PageBuilder implements PageBuilderContract
|
||||
* @param string|null $css
|
||||
* @return string
|
||||
*/
|
||||
public function customStyle(string $css = null)
|
||||
public function customStyle(?string $css = null)
|
||||
{
|
||||
if (! is_null($css)) {
|
||||
$this->css = $css;
|
||||
@@ -392,7 +392,7 @@ class PageBuilder implements PageBuilderContract
|
||||
* @param string|null $scripts
|
||||
* @return string
|
||||
*/
|
||||
public function customScripts(string $location, string $scripts = null)
|
||||
public function customScripts(string $location, ?string $scripts = null)
|
||||
{
|
||||
if (! is_null($scripts)) {
|
||||
$this->scripts[$location] = $scripts;
|
||||
|
||||
Reference in New Issue
Block a user