diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2016-06-11 19:49:03 +0200 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2016-06-11 19:49:03 +0200 |
commit | 69228b82cc69280f2bb4e15cf7cce178eb6a16b4 (patch) | |
tree | 2e37b614f522be09f12ddfadcee3b35e9160e6e7 | |
parent | 71516fd861b84e2ff524c228bed743069fb81ff3 (diff) | |
download | chd_gestion-69228b82cc69280f2bb4e15cf7cce178eb6a16b4.zip chd_gestion-69228b82cc69280f2bb4e15cf7cce178eb6a16b4.tar.gz chd_gestion-69228b82cc69280f2bb4e15cf7cce178eb6a16b4.tar.bz2 |
Don't leak database passwords.
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | generator/before-bake/config/app.php | 58 | ||||
-rw-r--r-- | generator/before-bake/config/secrets.default.php | 43 |
3 files changed, 46 insertions, 56 deletions
@@ -1,3 +1,4 @@ api/d3 api/test.php api/inc/config.php +generator/before-bake/config/secrets.php diff --git a/generator/before-bake/config/app.php b/generator/before-bake/config/app.php index f8d0e1d..fbaa644 100644 --- a/generator/before-bake/config/app.php +++ b/generator/before-bake/config/app.php @@ -18,7 +18,7 @@ * You should have received a copy of the GNU General Public License * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>. **/ -return [ +return array_merge(include('secrets.php'), [ /** * Debug Level: * @@ -74,17 +74,6 @@ return [ ], /** - * Security and encryption configuration - * - * - salt - A random string used in security hashing methods. - * The salt value is also used as the encryption key. - * You should treat it as extremely sensitive data. - */ - 'Security' => [ - 'salt' => 'eb74ed8697b7bc31587f48bec13cdcc0460debf26cec73137e4c6d390a93de4d', - ], - - /** * Apply timestamps with the last modified time to static assets (js, css, images). * Will append a querystring parameter containing the time the file was modified. * This is useful for busting browser caches. @@ -217,49 +206,6 @@ return [ ], /** - * Connection information used by the ORM to connect - * to your application's datastores. - * Drivers include Mysql Postgres Sqlite Sqlserver - * See vendor\cakephp\cakephp\src\Database\Driver for complete list - */ - 'Datasources' => [ - 'default' => [ - 'className' => 'Cake\Database\Connection', - 'driver' => 'Cake\Database\Driver\Mysql', - 'persistent' => false, - 'host' => 'localhost', - 'username' => 'gestion', - 'password' => 'cha6fus0EiPh', - 'database' => 'gestion', - 'encoding' => 'utf8', - 'timezone' => 'UTC', - 'cacheMetadata' => true, - 'log' => false, - 'quoteIdentifiers' => false, - //'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'], - ], - - /** - * The test connection is used during the test suite. - */ - 'test' => [ - 'className' => 'Cake\Database\Connection', - 'driver' => 'Cake\Database\Driver\Mysql', - 'persistent' => false, - 'host' => 'localhost', - 'username' => 'gestion_test', - 'password' => 'cha6fus0EiPh', - 'database' => 'gestion_test', - 'encoding' => 'utf8', - 'timezone' => 'UTC', - 'cacheMetadata' => true, - 'log' => false, - 'quoteIdentifiers' => false, - //'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'], - ], - ], - - /** * Configures logging options */ 'Log' => [ @@ -318,4 +264,4 @@ return [ 'Session' => [ 'defaults' => 'php', ], -]; +]); diff --git a/generator/before-bake/config/secrets.default.php b/generator/before-bake/config/secrets.default.php new file mode 100644 index 0000000..64f4271 --- /dev/null +++ b/generator/before-bake/config/secrets.default.php @@ -0,0 +1,43 @@ +<?php +return [ + 'Security' => [ + 'salt' => 'eXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXd', + ], + + 'Datasources' => [ + 'default' => [ + 'className' => 'Cake\Database\Connection', + 'driver' => 'Cake\Database\Driver\Mysql', + 'persistent' => false, + 'host' => 'localhost', + 'username' => 'cake', + 'password' => 'cake', + 'database' => 'cake', + 'encoding' => 'utf8', + 'timezone' => 'UTC', + 'cacheMetadata' => true, + 'log' => false, + 'quoteIdentifiers' => false, + //'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'], + ], + + /** + * The test connection is used during the test suite. + */ + 'test' => [ + 'className' => 'Cake\Database\Connection', + 'driver' => 'Cake\Database\Driver\Mysql', + 'persistent' => false, + 'host' => 'localhost', + 'username' => 'test', + 'password' => 'test', + 'database' => 'test', + 'encoding' => 'utf8', + 'timezone' => 'UTC', + 'cacheMetadata' => true, + 'log' => false, + 'quoteIdentifiers' => false, + //'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'], + ], + ], +]; |