Skip to content

Commit

Permalink
Merge pull request #15 from kenjis/update-to-420
Browse files Browse the repository at this point in the history
Update to 4.2.0
  • Loading branch information
kenjis authored Jun 7, 2022
2 parents c4df407 + f375549 commit 105e4b9
Show file tree
Hide file tree
Showing 13 changed files with 1,169 additions and 1,158 deletions.
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ This template changes the default configuration of CI4 more secure.

This repository includes:

- [CodeIgniter](https://github.com/codeigniter4/CodeIgniter4) 4.2.0-dev
- [CodeIgniter](https://github.com/codeigniter4/CodeIgniter4) 4.2.0
- [Translations for CodeIgniter 4 System Messages](https://github.com/codeigniter4/translations) dev-develop
- [CodeIgniter DevKit](https://github.com/codeigniter4/devkit)
- [CodeIgniter DevKit](https://github.com/codeigniter4/devkit) 1.0.0
- [PHPUnit](https://github.com/sebastianbergmann/phpunit) 9.5.20
- [Liaison Revision](https://github.com/paulbalandan/liaison-revision) 1.1.0
- [bear/qatools](https://github.com/bearsunday/BEAR.QATools) 1.10.0
Expand Down Expand Up @@ -100,13 +100,21 @@ $ php spark revision:update

### Filters

- CSRF filter is enabled. [app/Config/Filters.php](https://github.com/kenjis/ci4-app-template/blob/ci4-app-template/app/Config/Filters.php#L57-L60). See https://codeigniter4.github.io/CodeIgniter4/libraries/security.html#enable-csrf-protection
- InvalidChars filter is enabled. [app/Config/Filters.php](https://github.com/kenjis/ci4-app-template/blob/ci4-app-template/app/Config/Filters.php#L38). See https://codeigniter4.github.io/CodeIgniter4/incoming/filters.html#invalidchars
- SecureHeaders filter is enabled. [app/Config/Filters.php](https://github.com/kenjis/ci4-app-template/blob/ci4-app-template/app/Config/Filters.php#L43). See https://codeigniter4.github.io/CodeIgniter4/incoming/filters.html#secureheaders
- CSRF filter is enabled.
- [app/Config/Filters.php](https://github.com/kenjis/ci4-app-template/blob/ci4-app-template/app/Config/Filters.php#L57-L60).
- See https://codeigniter4.github.io/CodeIgniter4/libraries/security.html#enable-csrf-protection
- InvalidChars filter is enabled.
- [app/Config/Filters.php](https://github.com/kenjis/ci4-app-template/blob/ci4-app-template/app/Config/Filters.php#L38).
- See https://codeigniter4.github.io/CodeIgniter4/incoming/filters.html#invalidchars
- SecureHeaders filter is enabled.
- [app/Config/Filters.php](https://github.com/kenjis/ci4-app-template/blob/ci4-app-template/app/Config/Filters.php#L43).
- See https://codeigniter4.github.io/CodeIgniter4/incoming/filters.html#secureheaders

### Features

- `Config\Feature::$multipleFilters` is enabled. [app/Config/Feature.php](https://github.com/kenjis/ci4-app-template/blob/ci4-app-template/app/Config/Feature.php#L26). See https://codeigniter4.github.io/CodeIgniter4/incoming/routing.html#applying-filters
- `Config\Feature::$multipleFilters` is enabled.
- [app/Config/Feature.php](https://github.com/kenjis/ci4-app-template/blob/ci4-app-template/app/Config/Feature.php#L26).
- See https://codeigniter4.github.io/CodeIgniter4/incoming/routing.html#applying-filters

### Others

Expand Down
35 changes: 18 additions & 17 deletions app/Config/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,23 +57,24 @@ class Database extends Config
* @var array
*/
public $tests = [
'DSN' => '',
'hostname' => '127.0.0.1',
'username' => '',
'password' => '',
'database' => ':memory:',
'DBDriver' => 'SQLite3',
'DBPrefix' => 'db_', // Needed to ensure we're working correctly with prefixes live. DO NOT REMOVE FOR CI DEVS
'pConnect' => false,
'DBDebug' => (ENVIRONMENT !== 'production'),
'charset' => 'utf8',
'DBCollat' => 'utf8_general_ci',
'swapPre' => '',
'encrypt' => false,
'compress' => false,
'strictOn' => false,
'failover' => [],
'port' => 3306,
'DSN' => '',
'hostname' => '127.0.0.1',
'username' => '',
'password' => '',
'database' => ':memory:',
'DBDriver' => 'SQLite3',
'DBPrefix' => 'db_', // Needed to ensure we're working correctly with prefixes live. DO NOT REMOVE FOR CI DEVS
'pConnect' => false,
'DBDebug' => (ENVIRONMENT !== 'production'),
'charset' => 'utf8',
'DBCollat' => 'utf8_general_ci',
'swapPre' => '',
'encrypt' => false,
'compress' => false,
'strictOn' => false,
'failover' => [],
'port' => 3306,
'foreignKeys' => true,
];

public function __construct()
Expand Down
6 changes: 3 additions & 3 deletions app/Config/Routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

// Load the system's routing file first, so that the app and ENVIRONMENT
// can override as needed.
if (file_exists(SYSTEMPATH . 'Config/Routes.php')) {
if (is_file(SYSTEMPATH . 'Config/Routes.php')) {
require SYSTEMPATH . 'Config/Routes.php';
}

Expand Down Expand Up @@ -35,7 +35,7 @@

// We get a performance increase by specifying the default
// route since we don't have to scan directories.
//$routes->get('/', 'Home::index');
//$routes->get('/', 'Home::getIndex');

/*
* --------------------------------------------------------------------
Expand All @@ -50,6 +50,6 @@
* You will have access to the $routes object within that file without
* needing to reload it.
*/
if (file_exists(APPPATH . 'Config/' . ENVIRONMENT . '/Routes.php')) {
if (is_file(APPPATH . 'Config/' . ENVIRONMENT . '/Routes.php')) {
require APPPATH . 'Config/' . ENVIRONMENT . '/Routes.php';
}
Loading

0 comments on commit 105e4b9

Please sign in to comment.