Core_Security
in package
Security helper. XSS protection. CSRF token.
Tags
Table of Contents
Properties
- $_checkCsrfError : null|string
- The last CSRF error
Methods
- checkCsrf() : bool
- Check valid CSRF-token
- checkXSS() : bool
- Check XSS
- getCsrfError() : mixed
- Get last CSRF error
- getCsrfToken() : mixed
- Get CSRF token
- throwCsrfError() : mixed
- Throw csrf error
- _chr_hexdec() : string
- Callback for hexadecimals
Properties
$_checkCsrfError
The last CSRF error
protected
static null|string
$_checkCsrfError
= \NULL
Methods
checkCsrf()
Check valid CSRF-token
public
static checkCsrf(string $secret_csrf, mixed $lifetime) : bool
Parameters
- $secret_csrf : string
-
Token to check
- $lifetime : mixed
Return values
boolcheckXSS()
Check XSS
public
static checkXSS(string $string) : bool
Parameters
- $string : string
Return values
boolgetCsrfError()
Get last CSRF error
public
static getCsrfError() : mixed
getCsrfToken()
Get CSRF token
public
static getCsrfToken() : mixed
throwCsrfError()
Throw csrf error
public
static throwCsrfError() : mixed
_chr_hexdec()
Callback for hexadecimals
protected
static _chr_hexdec(array<string|int, mixed> $matches) : string
Parameters
- $matches : array<string|int, mixed>