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:
2018-03-06 04:28:44 +02:00
parent a39289ac9c
commit 417076243d
26 changed files with 583 additions and 326 deletions

View File

@ -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;
}
}