Crypto params validation
This commit is contained in:
@@ -119,24 +119,6 @@ class Properties implements \ArrayAccess
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Is given parameter a boolean parameter.
|
||||
*
|
||||
* @param $param string Parameter name.
|
||||
*
|
||||
* @return bool Is a boolean parameter.
|
||||
*/
|
||||
private function isBooleanParam($param)
|
||||
{
|
||||
return in_array(
|
||||
$param, [
|
||||
Opt::APPEND_SALT, Opt::CASE_INSENSITIVE_USERNAME,
|
||||
Opt::NAME_CHANGE, Opt::PASSWORD_CHANGE, Opt::PREPEND_SALT,
|
||||
Opt::REVERSE_ACTIVE, Opt::USE_CACHE
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an array with all supported parameters.
|
||||
*
|
||||
@@ -162,6 +144,24 @@ class Properties implements \ArrayAccess
|
||||
return $params;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is given parameter a boolean parameter.
|
||||
*
|
||||
* @param $param string Parameter name.
|
||||
*
|
||||
* @return bool Is a boolean parameter.
|
||||
*/
|
||||
private function isBooleanParam($param)
|
||||
{
|
||||
return in_array(
|
||||
$param, [
|
||||
Opt::APPEND_SALT, Opt::CASE_INSENSITIVE_USERNAME,
|
||||
Opt::NAME_CHANGE, Opt::PASSWORD_CHANGE, Opt::PREPEND_SALT,
|
||||
Opt::REVERSE_ACTIVE, Opt::USE_CACHE
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store properties in the cache memory.
|
||||
*/
|
||||
@@ -229,6 +229,7 @@ class Properties implements \ArrayAccess
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
$this->config->deleteAppValue($this->appName, $offset);
|
||||
unset($this->data[$offset]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user