From c3ce9913cfdca4b45c5f5d48f253e8ea8e055797 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 2 Feb 2021 11:35:03 -0500 Subject: [PATCH] Upgrade cakephp to 2.10.24 --- web/api/CONTRIBUTING.md | 20 +- web/api/app/Config/Schema/db_acl.sql | 2 +- web/api/app/Config/Schema/sessions.php | 36 +- web/api/app/Config/email.php.default | 5 +- web/api/app/Controller/AppController.php | 14 +- web/api/app/Model/AppModel.php | 10 +- web/api/app/View/Emails/html/default.ctp | 14 +- web/api/app/View/Emails/text/default.ctp | 14 +- web/api/app/View/Errors/error400.ctp | 12 +- web/api/app/View/Errors/error500.ctp | 12 +- web/api/app/View/Helper/AppHelper.php | 10 +- .../app/View/Layouts/Emails/html/default.ctp | 16 +- .../app/View/Layouts/Emails/text/default.ctp | 14 +- web/api/app/View/Layouts/ajax.ctp | 12 +- web/api/app/View/Layouts/default.ctp | 20 +- web/api/app/View/Layouts/error.ctp | 18 +- web/api/app/View/Layouts/flash.ctp | 26 +- web/api/app/View/Layouts/rss/default.ctp | 3 +- web/api/app/View/Pages/home.ctp | 221 +++-- web/api/app/index.php | 12 +- web/api/app/webroot/css/cake.generic.css | 43 +- web/api/app/webroot/index.php | 46 +- web/api/app/webroot/test.php | 36 +- web/api/build.properties | 2 +- web/api/build.xml | 7 +- web/api/composer.json | 73 +- web/api/index.php | 10 +- web/api/lib/Cake/Cache/Engine/FileEngine.php | 6 +- web/api/lib/Cake/Cache/Engine/RedisEngine.php | 2 +- .../Cake/Console/Command/CompletionShell.php | 2 +- .../lib/Cake/Console/Command/SchemaShell.php | 2 +- .../Cake/Console/Command/Task/ModelTask.php | 4 +- .../lib/Cake/Console/Command/TestShell.php | 23 +- .../lib/Cake/Console/Command/UpgradeShell.php | 2 +- .../lib/Cake/Console/ConsoleOptionParser.php | 4 +- web/api/lib/Cake/Console/ConsoleOutput.php | 2 +- web/api/lib/Cake/Console/Shell.php | 10 +- web/api/lib/Cake/Console/ShellDispatcher.php | 7 +- .../default/actions/controller_actions.ctp | 5 +- .../lib/Cake/Console/Templates/skel/.htaccess | 5 + .../Console/Templates/skel/webroot/.htaccess | 6 + .../Controller/Component/CookieComponent.php | 2 +- .../Component/RequestHandlerComponent.php | 17 +- .../Controller/Component/SessionComponent.php | 4 +- web/api/lib/Cake/Controller/Controller.php | 37 +- .../Controller/RequestHandlerComponent.php | 796 ++++++++++++++++++ web/api/lib/Cake/Core/App.php | 4 +- web/api/lib/Cake/Core/Configure.php | 3 + web/api/lib/Cake/Event/CakeEventManager.php | 7 +- web/api/lib/Cake/I18n/L10n.php | 3 + web/api/lib/Cake/Log/CakeLog.php | 6 +- .../Model/Behavior/ContainableBehavior.php | 2 +- .../Cake/Model/Behavior/TranslateBehavior.php | 2 +- .../lib/Cake/Model/Behavior/TreeBehavior.php | 2 +- web/api/lib/Cake/Model/CakeSchema.php | 23 +- .../lib/Cake/Model/Datasource/CakeSession.php | 24 +- .../Cake/Model/Datasource/Database/Mysql.php | 7 +- .../Model/Datasource/Database/Postgres.php | 6 +- .../Cake/Model/Datasource/Database/Sqlite.php | 3 +- .../lib/Cake/Model/Datasource/DboSource.php | 152 ++-- web/api/lib/Cake/Model/Model.php | 45 +- web/api/lib/Cake/Model/ModelValidator.php | 6 +- web/api/lib/Cake/Model/Permission.php | 4 +- web/api/lib/Cake/Network/CakeRequest.php | 31 +- web/api/lib/Cake/Network/CakeResponse.php | 40 +- web/api/lib/Cake/Network/CakeSocket.php | 28 +- web/api/lib/Cake/Network/Email/CakeEmail.php | 20 +- web/api/lib/Cake/Network/Http/HttpSocket.php | 44 +- web/api/lib/Cake/Routing/Router.php | 2 +- .../lib/Cake/Test/Case/AllControllerTest.php | 1 + .../lib/Cake/Test/Case/Cache/CacheTest.php | 8 +- .../Console/Command/Task/ExtractTaskTest.php | 69 +- .../Controller/ApplicationControllerTest.php | 104 +++ .../Component/RequestHandlerComponentTest.php | 14 + .../lib/Cake/Test/Case/I18n/MultibyteTest.php | 53 +- .../Model/Behavior/TranslateBehaviorTest.php | 22 +- .../Cake/Test/Case/Model/CakeSchemaTest.php | 15 + .../Model/Datasource/Database/MysqlTest.php | 65 +- .../Datasource/Database/PostgresTest.php | 20 + .../Case/Model/Datasource/DboSourceTest.php | 86 +- .../Cake/Test/Case/Model/ModelReadTest.php | 11 +- .../Test/Case/Model/ModelValidationTest.php | 3 + .../Test/Case/Network/CakeRequestTest.php | 7 +- .../Test/Case/Network/Email/CakeEmailTest.php | 25 +- .../Test/Case/Network/Http/HttpSocketTest.php | 2 +- .../Test/Case/TestSuite/CakeTestCaseTest.php | 3 +- .../Case/TestSuite/CakeTestFixtureTest.php | 1 - .../Cake/Test/Case/Utility/CakeTimeTest.php | 106 ++- .../Cake/Test/Case/Utility/SecurityTest.php | 2 +- .../Test/Case/View/Helper/FormHelperTest.php | 58 +- .../Test/Case/View/Helper/RssHelperTest.php | 6 +- web/api/lib/Cake/Test/Case/View/ViewTest.php | 32 +- .../Controller/ActionsUsingSessions.ctp | 5 +- .../Controller/ActionsWithNoSessions.ctp | 5 +- web/api/lib/Cake/TestSuite/CakeTestCase.php | 7 +- web/api/lib/Cake/TestSuite/CakeTestRunner.php | 11 +- .../Cake/TestSuite/CakeTestSuiteCommand.php | 13 +- .../TestSuite/CakeTestSuiteDispatcher.php | 20 +- .../lib/Cake/TestSuite/ControllerTestCase.php | 27 +- web/api/lib/Cake/Utility/CakeText.php | 79 +- web/api/lib/Cake/Utility/CakeTime.php | 107 ++- web/api/lib/Cake/Utility/ClassRegistry.php | 4 +- web/api/lib/Cake/Utility/Debugger.php | 6 +- web/api/lib/Cake/Utility/Folder.php | 4 +- web/api/lib/Cake/Utility/Hash.php | 4 +- web/api/lib/Cake/Utility/ObjectCollection.php | 3 +- web/api/lib/Cake/Utility/Sanitize.php | 2 +- web/api/lib/Cake/Utility/Set.php | 2 +- web/api/lib/Cake/VERSION.txt | 2 +- web/api/lib/Cake/View/Helper/FormHelper.php | 11 +- web/api/lib/Cake/View/Helper/HtmlHelper.php | 4 +- .../Cake/View/Helper/JsBaseEngineHelper.php | 16 +- web/api/lib/Cake/View/View.php | 8 +- web/api/lib/Cake/basics.php | 23 +- 114 files changed, 2303 insertions(+), 881 deletions(-) create mode 100644 web/api/lib/Cake/Console/Templates/skel/.htaccess create mode 100644 web/api/lib/Cake/Console/Templates/skel/webroot/.htaccess create mode 100644 web/api/lib/Cake/Controller/RequestHandlerComponent.php create mode 100644 web/api/lib/Cake/Test/Case/Controller/ApplicationControllerTest.php diff --git a/web/api/CONTRIBUTING.md b/web/api/CONTRIBUTING.md index 211d68744..8c7ceb48b 100644 --- a/web/api/CONTRIBUTING.md +++ b/web/api/CONTRIBUTING.md @@ -9,6 +9,10 @@ CakePHP loves to welcome your contributions. There are several ways to help out: There are a few guidelines that we need contributors to follow so that we have a chance of keeping on top of things. +## Code of Conduct + +Help us keep CakePHP open and inclusive. Please read and follow our [Code of Conduct](https://github.com/cakephp/code-of-conduct/blob/master/CODE_OF_CONDUCT.md). + ## Getting Started * Make sure you have a [GitHub account](https://github.com/signup/free). @@ -33,14 +37,14 @@ chance of keeping on top of things. * Core test cases should continue to pass. You can run tests locally or enable [travis-ci](https://travis-ci.org/) for your fork, so all tests and codesniffs will be executed. -* Your work should apply the CakePHP coding standards. +* Your work should apply the [CakePHP coding standards](https://book.cakephp.org/2.0/en/contributing/cakephp-coding-conventions.html). ## Which branch to base the work * Bugfix branches will be based on master. * New features that are backwards compatible will be based on next minor release branch. -* New features or other non-BC changes will go in the next major release branch. +* New features or other non backwards compatible changes will go in the next major release branch. ## Submitting Changes @@ -50,8 +54,8 @@ chance of keeping on top of things. ## Test cases and codesniffer -CakePHP tests requires [PHPUnit](http://www.phpunit.de/manual/current/en/installation.html) -3.5 or higher. To run the test cases locally use the following command: +CakePHP tests requires [PHPUnit](https://phpunit.de/manual/current/en/installation.html) +3.7, version 4 is not compatible. To run the test cases locally use the following command: ./lib/Cake/Console/cake test core AllTests --stderr @@ -60,12 +64,16 @@ To run the sniffs for CakePHP coding standards: phpcs -p --extensions=php --standard=CakePHP ./lib/Cake Check the [cakephp-codesniffer](https://github.com/cakephp/cakephp-codesniffer) -repository to setup the CakePHP standard. The README contains installation info +repository to setup the CakePHP standard. The [README](https://github.com/cakephp/cakephp-codesniffer/blob/master/README.md) contains installation info for the sniff and phpcs. +## Reporting a Security Issue + +If you've found a security related issue in CakePHP, please don't open an issue in GitHub. Instead contact us at security@cakephp.org. For more information on how we handle security issues, [see the CakePHP Security Issue Process](https://book.cakephp.org/2.0/en/contributing/tickets.html#reporting-security-issues). + # Additional Resources -* [CakePHP coding standards](http://book.cakephp.org/2.0/en/contributing/cakephp-coding-conventions.html) +* [CakePHP coding standards](https://book.cakephp.org/2.0/en/contributing/cakephp-coding-conventions.html) * [Existing issues](https://github.com/cakephp/cakephp/issues) * [Development Roadmaps](https://github.com/cakephp/cakephp/wiki#roadmaps) * [General GitHub documentation](https://help.github.com/) diff --git a/web/api/app/Config/Schema/db_acl.sql b/web/api/app/Config/Schema/db_acl.sql index cbb0ccece..e0a0e02fb 100644 --- a/web/api/app/Config/Schema/db_acl.sql +++ b/web/api/app/Config/Schema/db_acl.sql @@ -40,7 +40,7 @@ CREATE TABLE aros ( PRIMARY KEY (id) ); -/* this indexes will improve acl perfomance */ +/* this indexes will improve acl performance */ CREATE INDEX idx_acos_lft_rght ON `acos` (`lft`, `rght`); CREATE INDEX idx_acos_alias ON `acos` (`alias`); diff --git a/web/api/app/Config/Schema/sessions.php b/web/api/app/Config/Schema/sessions.php index 14ff2c6d4..b766ebff0 100644 --- a/web/api/app/Config/Schema/sessions.php +++ b/web/api/app/Config/Schema/sessions.php @@ -4,37 +4,57 @@ * * Use it to configure database for Sessions * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @package app.Config.Schema * @since CakePHP(tm) v 0.2.9 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ -/* - * +/** * Using the Schema command line utility * cake schema run create Sessions - * */ class SessionsSchema extends CakeSchema { +/** + * Name property + * + * @var string + */ public $name = 'Sessions'; +/** + * Before callback. + * + * @param array $event Schema object properties + * @return bool Should process continue + */ public function before($event = array()) { return true; } +/** + * After callback. + * + * @param array $event Schema object properties + * @return void + */ public function after($event = array()) { } +/** + * The cake_sessions table definition + * + * @var array + */ public $cake_sessions = array( 'id' => array('type' => 'string', 'null' => false, 'key' => 'primary'), 'data' => array('type' => 'text', 'null' => true, 'default' => null), diff --git a/web/api/app/Config/email.php.default b/web/api/app/Config/email.php.default index 6dcfdd8f9..353548e6a 100644 --- a/web/api/app/Config/email.php.default +++ b/web/api/app/Config/email.php.default @@ -1,7 +1,5 @@ * The origin email. See CakeEmail::from() about the valid values - * */ class EmailConfig { diff --git a/web/api/app/Controller/AppController.php b/web/api/app/Controller/AppController.php index 737dedacf..3cd001e7c 100644 --- a/web/api/app/Controller/AppController.php +++ b/web/api/app/Controller/AppController.php @@ -5,18 +5,18 @@ * This file is application-wide controller file. You can put all * application-wide controller-related methods here. * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @package app.Controller * @since CakePHP(tm) v 0.2.9 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://www.opensource.org/licenses/mit-license.php MIT License */ App::uses('Controller', 'Controller'); App::uses('CrudControllerTrait', 'Crud.Lib'); @@ -27,8 +27,8 @@ App::uses('CrudControllerTrait', 'Crud.Lib'); * Add your application-wide methods in the class below, your controllers * will inherit them. * - * @package app.Controller - * @link http://book.cakephp.org/2.0/en/controllers.html#the-app-controller + * @package app.Controller + * @link https://book.cakephp.org/2.0/en/controllers.html#the-app-controller */ class AppController extends Controller { use CrudControllerTrait; diff --git a/web/api/app/Model/AppModel.php b/web/api/app/Model/AppModel.php index 27836464d..bf4b88add 100644 --- a/web/api/app/Model/AppModel.php +++ b/web/api/app/Model/AppModel.php @@ -5,18 +5,18 @@ * This file is application-wide model file. You can put all * application-wide model-related methods here. * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @package app.Model * @since CakePHP(tm) v 0.2.9 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ App::uses('Model', 'Model'); diff --git a/web/api/app/View/Emails/html/default.ctp b/web/api/app/View/Emails/html/default.ctp index e2bff19c0..a6e95fe6a 100644 --- a/web/api/app/View/Emails/html/default.ctp +++ b/web/api/app/View/Emails/html/default.ctp @@ -1,19 +1,17 @@ ' . $line . "

\n"; endforeach; -?> \ No newline at end of file +?> diff --git a/web/api/app/View/Emails/text/default.ctp b/web/api/app/View/Emails/text/default.ctp index 090b5c403..48ea5660a 100644 --- a/web/api/app/View/Emails/text/default.ctp +++ b/web/api/app/View/Emails/text/default.ctp @@ -1,19 +1,17 @@ - \ No newline at end of file + diff --git a/web/api/app/View/Errors/error400.ctp b/web/api/app/View/Errors/error400.ctp index 4c3850b28..311a53175 100644 --- a/web/api/app/View/Errors/error400.ctp +++ b/web/api/app/View/Errors/error400.ctp @@ -1,19 +1,17 @@

diff --git a/web/api/app/View/Errors/error500.ctp b/web/api/app/View/Errors/error500.ctp index 518b9ee77..8b6eb9724 100644 --- a/web/api/app/View/Errors/error500.ctp +++ b/web/api/app/View/Errors/error500.ctp @@ -1,19 +1,17 @@

diff --git a/web/api/app/View/Helper/AppHelper.php b/web/api/app/View/Helper/AppHelper.php index 9097d33f0..4851a5b41 100644 --- a/web/api/app/View/Helper/AppHelper.php +++ b/web/api/app/View/Helper/AppHelper.php @@ -5,18 +5,18 @@ * This file is application-wide helper file. You can put all * application-wide helper-related methods here. * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @package app.View.Helper * @since CakePHP(tm) v 0.2.9 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ App::uses('Helper', 'View'); diff --git a/web/api/app/View/Layouts/Emails/html/default.ctp b/web/api/app/View/Layouts/Emails/html/default.ctp index da3851a09..747994a63 100644 --- a/web/api/app/View/Layouts/Emails/html/default.ctp +++ b/web/api/app/View/Layouts/Emails/html/default.ctp @@ -1,29 +1,27 @@ - <?php echo $title_for_layout; ?> + <?php echo $this->fetch('title'); ?> fetch('content'); ?> -

This email was sent using the CakePHP Framework

+

This email was sent using the CakePHP Framework

\ No newline at end of file diff --git a/web/api/app/View/Layouts/Emails/text/default.ctp b/web/api/app/View/Layouts/Emails/text/default.ctp index ee624de45..82a1e195b 100644 --- a/web/api/app/View/Layouts/Emails/text/default.ctp +++ b/web/api/app/View/Layouts/Emails/text/default.ctp @@ -1,21 +1,19 @@ fetch('content'); ?> -This email was sent using the CakePHP Framework, http://cakephp.org. +This email was sent using the CakePHP Framework, https://cakephp.org. diff --git a/web/api/app/View/Layouts/ajax.ctp b/web/api/app/View/Layouts/ajax.ctp index 0f9a4fb62..7e14112c1 100644 --- a/web/api/app/View/Layouts/ajax.ctp +++ b/web/api/app/View/Layouts/ajax.ctp @@ -1,19 +1,17 @@ fetch('content'); ?> diff --git a/web/api/app/View/Layouts/default.ctp b/web/api/app/View/Layouts/default.ctp index 38dececbc..2f8d3cb8e 100644 --- a/web/api/app/View/Layouts/default.ctp +++ b/web/api/app/View/Layouts/default.ctp @@ -1,19 +1,17 @@ Html->charset(); ?> <?php echo $cakeDescription ?>: - <?php echo $title_for_layout; ?> + <?php echo $this->fetch('title'); ?> Html->meta('icon'); @@ -40,18 +38,18 @@ $cakeVersion = __d('cake_dev', 'CakePHP %s', Configure::version())
- Session->flash(); ?> + Flash->render(); ?> fetch('content'); ?>