Added medium enencryption and added an over all improvment to the encryption implementation. Added extra security to EXTERNALCODE feature that only allows admin to make use of this feature.
This commit is contained in:
@ -3898,18 +3898,29 @@ abstract class ComponentbuilderHelper
|
||||
return implode($key);
|
||||
}
|
||||
|
||||
public static function getCryptKey($type, $default = null)
|
||||
/**
|
||||
* Get The Encryption Keys
|
||||
*
|
||||
* @param string $type The type of key
|
||||
* @param string/bool $default The return value if no key was found
|
||||
*
|
||||
* @return string On success
|
||||
*
|
||||
**/
|
||||
public static function getCryptKey($type, $default = false)
|
||||
{
|
||||
// Get the global params
|
||||
$params = JComponentHelper::getParams('com_componentbuilder', true);
|
||||
// Basic Encryption Type
|
||||
if ('basic' === $type)
|
||||
{
|
||||
// Get the global params
|
||||
$params = JComponentHelper::getParams('com_componentbuilder', true);
|
||||
$basic_key = $params->get('basic_key', $default);
|
||||
if ($basic_key)
|
||||
if (self::checkString($basic_key))
|
||||
{
|
||||
return $basic_key;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
return $default;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user