Programming Language PHP

Namespace Elabftw\Services

Class Filter

Method/Function sanitize

Total Examples 2

2 code examples of PHP Elabftw\Services\Filter::sanitize extracted from open source projects

Was this example useful?
0
                                                    /**
     * Check the cookie token
     */
    public static function token(string $token): string
    {
        if (mb_strlen($token) !== self::COOKIE_LENGTH) {
            throw new IllegalActionException('Invalid cookie!');
        }
        return Filter::sanitize($token);
    }
                                            
Was this example useful?
0
                                                    public function getExtra(string $key): string
    {
        return Filter::sanitize((string) $this->extra[$key]);
    }