SecurityController

Security Controller Trait Adds cross-site scripting protection methods to a controller based class

 trait System\Traits\SecurityController

Methods

protected makeXsrfCookie () : Symfony\Component\HttpFoundation\Cookie

Adds anti-CSRF cookie.

Adds a cookie with a token for CSRF checks to the response.

Returns
Symfony\Component\HttpFoundation\Cookie

protected verifyCsrfToken () : bool

Checks the request data / headers for a valid CSRF token.

Returns
bool

Returns false if a valid token is not found or cms.enableCsrfProtection is set to false

protected verifyForceSecure () : bool

Checks if the back-end should force a secure protocol (HTTPS) enabled by config.

Returns
bool
Copyright © 2024 Winter CMS