setEncryptionKeyCookie accesses the super-global variable $_COOKIE.
public function setEncryptionKeyCookie($sessionId, $asciiKey)
{
$this->validateSessionId($sessionId);
if(empty($asciiKey) || !is_string($asciiKey)) {
throw new \InvalidArgumentException(
deleteEncryptionKeyCookie accesses the super-global variable $_COOKIE.
public function deleteEncryptionKeyCookie($sessionId)
{
$this->validateSessionId($sessionId);
$cookieName = $this->config->keyCookiePrefix . $sessionId;
setcookie(
changeKeyCookieSessionId accesses the super-global variable $_COOKIE.
public function changeKeyCookieSessionId($oldSessionId, $newSessionId)
{
$this->validateSessionId($oldSessionId);
$this->validateSessionId($newSessionId);
$oldCookieName = $this->config->keyCookiePrefix . $oldSessionId;
setEncryptionKey accesses the super-global variable $_COOKIE.
public function setEncryptionKey($sessionId)
{
$cookieName = $this->config->keyCookiePrefix . $sessionId;
if(!empty($_COOKIE[$cookieName])) {
$this->encryptionKey = Key::loadFromAsciiSafeString($_COOKIE[$cookieName]);
changeKeyCookieSessionId accesses the super-global variable $_COOKIE.
public function changeKeyCookieSessionId($oldSessionId, $newSessionId)
{
$this->validateSessionId($oldSessionId);
$this->validateSessionId($newSessionId);
$oldCookieName = $this->config->keyCookiePrefix . $oldSessionId;
setEncryptionKey accesses the super-global variable $_COOKIE.
public function setEncryptionKey($sessionId)
{
$cookieName = $this->config->keyCookiePrefix . $sessionId;
if(!empty($_COOKIE[$cookieName])) {
$this->encryptionKey = Key::loadFromAsciiSafeString($_COOKIE[$cookieName]);
Function configureIniSettings
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
private function configureIniSettings()
{
/**
* Ignore these lines from code coverage as they are covered in build
* tests against different PHP versions.
Missing class import via use statement (line '59', column '23').
throw new \Exception(
Missing class import via use statement (line '282', column '27').
throw new \RuntimeException(
Missing class import via use statement (line '85', column '23').
throw new \InvalidArgumentException('Value did not match session ID regex.');
Missing class import via use statement (line '103', column '23').
throw new \InvalidArgumentException(
Avoid using static access to class '\Defuse\Crypto\Crypto' in method 'encrypt'.
return Crypto::encrypt($sessionData, $key);
Avoid using static access to class '\Defuse\Crypto\Key' in method 'setEncryptionKey'.
$this->encryptionKey = Key::loadFromAsciiSafeString($_COOKIE[$cookieName]);
Avoid using static access to class '\Defuse\Crypto\Key' in method 'setEncryptionKey'.
$this->encryptionKey = Key::createNewRandomKey();
Avoid using static access to class '\Defuse\Crypto\Crypto' in method 'decrypt'.
return Crypto::decrypt($sessionData, $key);
There are no issues that match your filters.