Adds phpseclib version 3.

This commit is contained in:
2022-12-29 08:12:03 +02:00
parent d28e4c74af
commit e614f2ec23
412 changed files with 66550 additions and 477 deletions

View File

@ -140,14 +140,14 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 18th December, 2022
+ *Last Build*: 29th December, 2023
+ *Version*: 3.1.13
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **337557**
+ *Line count*: **341727**
+ *Field count*: **2009**
+ *File count*: **2207**
+ *Folder count*: **388**
+ *File count*: **2222**
+ *Folder count*: **391**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)

View File

@ -5294,13 +5294,14 @@ class Fields extends Structure
}
$this->setLayoutBuilder($nameSingleCode, $tabName, $name, $field);
// only load fields we want to search
if ($dbSwitch && ComponentbuilderHelper::fieldCheck($typeName, 'search'))
// load all fields that are in the database
if ($dbSwitch)
{
// load a search array of view, field, and [encryption, type, tab]
CFactory::_('Registry')->set('all_search_fields.' . $nameSingleCode . '.' . $name,
// load array of view, field, and [encryption, type, tab]
CFactory::_('Registry')->set('all_component_fields.' . $nameSingleCode . '.' . $name,
[
'name' => $name,
'label' => $langLabel,
'type' => $typeName,
'title' => (isset($this->titleBuilder[$nameSingleCode]) && $name === $this->titleBuilder[$nameSingleCode]) ? true : false,
'list' => $nameListCode,

View File

@ -24403,7 +24403,7 @@ class Interpretation extends Fields
CFactory::_('Language')->set(
CFactory::_('Config')->lang_target, $lang . '_GLOBAL_DESC', "The Global Parameters"
);
// add auto checin if required
// add auto checkin if required
if ($this->addCheckin)
{
$this->configFieldSets[] = Indent::_(2) . "<field";

View File

@ -1037,7 +1037,7 @@ class Infusion extends Interpretation
}
// all fields stored in database
CFactory::_('Content')->set('ARRAY_ALL_SEARCH_FIELDS', CFactory::_('Registry')->varExport('all_search_fields', 1));
CFactory::_('Content')->set('ALL_COMPONENT_FIELDS', CFactory::_('Registry')->varExport('all_component_fields', 1));
// setup the layouts
$this->setCustomViewLayouts();

View File

@ -12,13 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// add the autoloader for the composer classes
$composer_autoloader = JPATH_LIBRARIES . '/phpseclib3/vendor/autoload.php';
if (file_exists($composer_autoloader))
{
require_once $composer_autoloader;
}
// register this component namespace
spl_autoload_register(function ($class) {
// project-specific base directories and namespace prefix
$search = array(
$search = [
'libraries/jcb_powers/VDM.Joomla' => 'VDM\\Joomla',
'libraries/jcb_powers/VDM.Gitea' => 'VDM\\Gitea'
);
];
// Start the search and load if found
$found = false;
$found_base_dir = "";
@ -40,7 +47,7 @@ spl_autoload_register(function ($class) {
// check if we found a match
if (!$found)
{
// no, move to the next registered autoloader
// not found so move to the next registered autoloader
return;
}
// get the relative class name
@ -3799,7 +3806,7 @@ abstract class ComponentbuilderHelper
// make sure we have the composer classes loaded
self::composerAutoload('phpseclib');
// build class name
$CLASS = '\phpseclib3\Crypt\\' . $type;
$CLASS = '\phpseclib\Crypt\\' . $type;
// make sure we have the phpseclib classes
if (!class_exists($CLASS))
{
@ -3958,7 +3965,7 @@ abstract class ComponentbuilderHelper
// make sure we have the composer classes loaded
self::composerAutoload('phpseclib');
// make sure we have the phpseclib classes
if (!class_exists('\phpseclib3\Net\SFTP'))
if (!class_exists('\phpseclib\Net\SFTP'))
{
// class not in place so send out error
JFactory::getApplication()->enqueueMessage(JText::_('COM_COMPONENTBUILDER_THE_BPHPSECLIBNETSFTPB_LIBRARYCLASS_IS_NOT_AVAILABLE_THIS_LIBRARYCLASS_SHOULD_HAVE_BEEN_ADDED_TO_YOUR_BLIBRARIESVDM_IOVENDORB_FOLDER_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFO'), 'Error');
@ -3967,7 +3974,7 @@ abstract class ComponentbuilderHelper
// insure the port is set
$server->port = (isset($server->port) && is_numeric($server->port) && $server->port > 0) ? (int) $server->port : 22;
// open the connection
self::$sftp[$server->cache] = new phpseclib3\Net\SFTP($server->host, $server->port);
self::$sftp[$server->cache] = new phpseclib\Net\SFTP($server->host, $server->port);
// heads-up on protocol
self::$sftp[$server->cache]->jcb_protocol = 2; // SFTP <-- if called not knowing what type of protocol is being used
// now login based on authentication type

View File

@ -175,7 +175,7 @@ class ComponentbuilderModelAjax extends ListModel
// we first use the new encryption
// load phpseclib <https://phpseclib.com/docs/symmetric>
$opened = false;
if(ComponentbuilderHelper::crypt('AES', 'CBC') instanceof \phpseclib3\Crypt\Rijndael)
if(ComponentbuilderHelper::crypt('AES', 'CBC') instanceof \phpseclib\Crypt\Rijndael)
{
// load the system password
ComponentbuilderHelper::crypt('AES', 'CBC')->setPassword($password, 'pbkdf2', 'sha256', 'VastDevelopmentMethod/salt');

View File

@ -1096,7 +1096,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
// check if we should use the phpseclib decryption
$phpseclip = (isset($this->packageInfo['phpseclib']) && $this->packageInfo['phpseclib']) ? true : $force;
// load phpseclib <https://phpseclib.com/docs/symmetric>
if($phpseclip && ComponentbuilderHelper::crypt('AES', 'CBC') instanceof \phpseclib3\Crypt\Rijndael)
if($phpseclip && ComponentbuilderHelper::crypt('AES', 'CBC') instanceof \phpseclib\Crypt\Rijndael)
{
// load the system password
ComponentbuilderHelper::crypt('AES', 'CBC')->setPassword($password, 'pbkdf2', 'sha256', 'VastDevelopmentMethod/salt');

View File

@ -1260,7 +1260,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
// $locker = new FOFEncryptAes($this->key, 128);
// $data = $locker->encryptString($data);
// load phpseclib <https://phpseclib.com/docs/symmetric>
if(ComponentbuilderHelper::crypt('AES', 'CBC') instanceof \phpseclib3\Crypt\Rijndael)
if(ComponentbuilderHelper::crypt('AES', 'CBC') instanceof \phpseclib\Crypt\Rijndael)
{
// set the password
ComponentbuilderHelper::crypt('AES', 'CBC')->setPassword($this->key, 'pbkdf2', 'sha256', 'VastDevelopmentMethod/salt');
@ -1314,7 +1314,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
return false;
}
// set info data
if(ComponentbuilderHelper::crypt('AES', 'CBC') instanceof \phpseclib3\Crypt\Rijndael)
if(ComponentbuilderHelper::crypt('AES', 'CBC') instanceof \phpseclib\Crypt\Rijndael)
{
// set system password
$db = 'COM_COMPONENTBUILDER_SZDEQZDMVSMHBTRWFIFTYTSQFLVVXJTMTHREEJTWOIXM';

File diff suppressed because one or more lines are too long