mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Actualizacion automatica: 2024-05-01 20:46:56
This commit is contained in:
8
.idea/safekat.iml
generated
8
.idea/safekat.iml
generated
@ -1,13 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<module type="WEB_MODULE" version="4">
|
<module type="WEB_MODULE" version="4">
|
||||||
<component name="NewModuleRootManager">
|
<component name="NewModuleRootManager">
|
||||||
<content url="file://$MODULE_DIR$">
|
<content url="file://$MODULE_DIR$" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/ci4/app" isTestSource="false" packagePrefix="App\" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/ci4/app/Config" isTestSource="false" packagePrefix="Config\" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/ci4/app/ThirdParty/DatatablesEditor/" isTestSource="false" packagePrefix="DataTables\" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/ci4/tests" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/ci4/tests/_support" isTestSource="true" packagePrefix="Tests\Support\" />
|
|
||||||
</content>
|
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Config;
|
namespace Config;
|
||||||
|
|
||||||
use CodeIgniter\Config\BaseConfig;
|
use CodeIgniter\Config\BaseConfig;
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace Config;
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Cache\CacheInterface;
|
||||||
use CodeIgniter\Cache\Handlers\DummyHandler;
|
use CodeIgniter\Cache\Handlers\DummyHandler;
|
||||||
use CodeIgniter\Cache\Handlers\FileHandler;
|
use CodeIgniter\Cache\Handlers\FileHandler;
|
||||||
use CodeIgniter\Cache\Handlers\MemcachedHandler;
|
use CodeIgniter\Cache\Handlers\MemcachedHandler;
|
||||||
@ -19,10 +20,8 @@ class Cache extends BaseConfig
|
|||||||
*
|
*
|
||||||
* The name of the preferred handler that should be used. If for some reason
|
* The name of the preferred handler that should be used. If for some reason
|
||||||
* it is not available, the $backupHandler will be used in its place.
|
* it is not available, the $backupHandler will be used in its place.
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $handler = 'file';
|
public string $handler = 'file';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
@ -32,10 +31,8 @@ class Cache extends BaseConfig
|
|||||||
* The name of the handler that will be used in case the first one is
|
* The name of the handler that will be used in case the first one is
|
||||||
* unreachable. Often, 'file' is used here since the filesystem is
|
* unreachable. Often, 'file' is used here since the filesystem is
|
||||||
* always available, though that's not always practical for the app.
|
* always available, though that's not always practical for the app.
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $backupHandler = 'dummy';
|
public string $backupHandler = 'dummy';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
@ -45,11 +42,9 @@ class Cache extends BaseConfig
|
|||||||
* The path to where cache files should be stored, if using a file-based
|
* The path to where cache files should be stored, if using a file-based
|
||||||
* system.
|
* system.
|
||||||
*
|
*
|
||||||
* @var string
|
|
||||||
*
|
|
||||||
* @deprecated Use the driver-specific variant under $file
|
* @deprecated Use the driver-specific variant under $file
|
||||||
*/
|
*/
|
||||||
public $storePath = WRITEPATH . 'cache/';
|
public string $storePath = WRITEPATH . 'cache/';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
@ -59,12 +54,12 @@ class Cache extends BaseConfig
|
|||||||
* Whether to take the URL query string into consideration when generating
|
* Whether to take the URL query string into consideration when generating
|
||||||
* output cache files. Valid options are:
|
* output cache files. Valid options are:
|
||||||
*
|
*
|
||||||
* false = Disabled
|
* false = Disabled
|
||||||
* true = Enabled, take all query parameters into account.
|
* true = Enabled, take all query parameters into account.
|
||||||
* Please be aware that this may result in numerous cache
|
* Please be aware that this may result in numerous cache
|
||||||
* files generated for the same page over and over again.
|
* files generated for the same page over and over again.
|
||||||
* array('q') = Enabled, but only take into account the specified list
|
* ['q'] = Enabled, but only take into account the specified list
|
||||||
* of query parameters.
|
* of query parameters.
|
||||||
*
|
*
|
||||||
* @var bool|string[]
|
* @var bool|string[]
|
||||||
*/
|
*/
|
||||||
@ -77,10 +72,8 @@ class Cache extends BaseConfig
|
|||||||
*
|
*
|
||||||
* This string is added to all cache item names to help avoid collisions
|
* This string is added to all cache item names to help avoid collisions
|
||||||
* if you run multiple applications with the same cache engine.
|
* if you run multiple applications with the same cache engine.
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $prefix = '';
|
public string $prefix = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
@ -92,10 +85,21 @@ class Cache extends BaseConfig
|
|||||||
* WARNING: This is not used by framework handlers where 60 seconds is
|
* WARNING: This is not used by framework handlers where 60 seconds is
|
||||||
* hard-coded, but may be useful to projects and modules. This will replace
|
* hard-coded, but may be useful to projects and modules. This will replace
|
||||||
* the hard-coded value in a future release.
|
* the hard-coded value in a future release.
|
||||||
*
|
|
||||||
* @var int
|
|
||||||
*/
|
*/
|
||||||
public $ttl = 60;
|
public int $ttl = 60;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Reserved Characters
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* A string of reserved characters that will not be allowed in keys or tags.
|
||||||
|
* Strings that violate this restriction will cause handlers to throw.
|
||||||
|
* Default: {}()/\@:
|
||||||
|
*
|
||||||
|
* NOTE: The default set is required for PSR-6 compliance.
|
||||||
|
*/
|
||||||
|
public string $reservedCharacters = '{}()/\@:';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
@ -106,7 +110,7 @@ class Cache extends BaseConfig
|
|||||||
*
|
*
|
||||||
* @var array<string, int|string|null>
|
* @var array<string, int|string|null>
|
||||||
*/
|
*/
|
||||||
public $file = [
|
public array $file = [
|
||||||
'storePath' => WRITEPATH . 'cache/',
|
'storePath' => WRITEPATH . 'cache/',
|
||||||
'mode' => 0640,
|
'mode' => 0640,
|
||||||
];
|
];
|
||||||
@ -120,9 +124,9 @@ class Cache extends BaseConfig
|
|||||||
*
|
*
|
||||||
* @see https://codeigniter.com/user_guide/libraries/caching.html#memcached
|
* @see https://codeigniter.com/user_guide/libraries/caching.html#memcached
|
||||||
*
|
*
|
||||||
* @var array<string, boolean|int|string>
|
* @var array<string, bool|int|string>
|
||||||
*/
|
*/
|
||||||
public $memcached = [
|
public array $memcached = [
|
||||||
'host' => '127.0.0.1',
|
'host' => '127.0.0.1',
|
||||||
'port' => 11211,
|
'port' => 11211,
|
||||||
'weight' => 1,
|
'weight' => 1,
|
||||||
@ -138,7 +142,7 @@ class Cache extends BaseConfig
|
|||||||
*
|
*
|
||||||
* @var array<string, int|string|null>
|
* @var array<string, int|string|null>
|
||||||
*/
|
*/
|
||||||
public $redis = [
|
public array $redis = [
|
||||||
'host' => '127.0.0.1',
|
'host' => '127.0.0.1',
|
||||||
'password' => null,
|
'password' => null,
|
||||||
'port' => 6379,
|
'port' => 6379,
|
||||||
@ -154,9 +158,9 @@ class Cache extends BaseConfig
|
|||||||
* This is an array of cache engine alias' and class names. Only engines
|
* This is an array of cache engine alias' and class names. Only engines
|
||||||
* that are listed here are allowed to be used.
|
* that are listed here are allowed to be used.
|
||||||
*
|
*
|
||||||
* @var array<string, string>
|
* @var array<string, class-string<CacheInterface>>
|
||||||
*/
|
*/
|
||||||
public $validHandlers = [
|
public array $validHandlers = [
|
||||||
'dummy' => DummyHandler::class,
|
'dummy' => DummyHandler::class,
|
||||||
'file' => FileHandler::class,
|
'file' => FileHandler::class,
|
||||||
'memcached' => MemcachedHandler::class,
|
'memcached' => MemcachedHandler::class,
|
||||||
|
|||||||
@ -38,9 +38,9 @@ defined('MINUTE') || define('MINUTE', 60);
|
|||||||
defined('HOUR') || define('HOUR', 3600);
|
defined('HOUR') || define('HOUR', 3600);
|
||||||
defined('DAY') || define('DAY', 86400);
|
defined('DAY') || define('DAY', 86400);
|
||||||
defined('WEEK') || define('WEEK', 604800);
|
defined('WEEK') || define('WEEK', 604800);
|
||||||
defined('MONTH') || define('MONTH', 2592000);
|
defined('MONTH') || define('MONTH', 2_592_000);
|
||||||
defined('YEAR') || define('YEAR', 31536000);
|
defined('YEAR') || define('YEAR', 31_536_000);
|
||||||
defined('DECADE') || define('DECADE', 315360000);
|
defined('DECADE') || define('DECADE', 315_360_000);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
| --------------------------------------------------------------------------
|
| --------------------------------------------------------------------------
|
||||||
@ -67,13 +67,28 @@ defined('DECADE') || define('DECADE', 315360000);
|
|||||||
| http://tldp.org/LDP/abs/html/exitcodes.html
|
| http://tldp.org/LDP/abs/html/exitcodes.html
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
defined('EXIT_SUCCESS') || define('EXIT_SUCCESS', 0); // no errors
|
defined('EXIT_SUCCESS') || define('EXIT_SUCCESS', 0); // no errors
|
||||||
defined('EXIT_ERROR') || define('EXIT_ERROR', 1); // generic error
|
defined('EXIT_ERROR') || define('EXIT_ERROR', 1); // generic error
|
||||||
defined('EXIT_CONFIG') || define('EXIT_CONFIG', 3); // configuration error
|
defined('EXIT_CONFIG') || define('EXIT_CONFIG', 3); // configuration error
|
||||||
defined('EXIT_UNKNOWN_FILE') || define('EXIT_UNKNOWN_FILE', 4); // file not found
|
defined('EXIT_UNKNOWN_FILE') || define('EXIT_UNKNOWN_FILE', 4); // file not found
|
||||||
defined('EXIT_UNKNOWN_CLASS') || define('EXIT_UNKNOWN_CLASS', 5); // unknown class
|
defined('EXIT_UNKNOWN_CLASS') || define('EXIT_UNKNOWN_CLASS', 5); // unknown class
|
||||||
defined('EXIT_UNKNOWN_METHOD') || define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
|
defined('EXIT_UNKNOWN_METHOD') || define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
|
||||||
defined('EXIT_USER_INPUT') || define('EXIT_USER_INPUT', 7); // invalid user input
|
defined('EXIT_USER_INPUT') || define('EXIT_USER_INPUT', 7); // invalid user input
|
||||||
defined('EXIT_DATABASE') || define('EXIT_DATABASE', 8); // database error
|
defined('EXIT_DATABASE') || define('EXIT_DATABASE', 8); // database error
|
||||||
defined('EXIT__AUTO_MIN') || define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
|
defined('EXIT__AUTO_MIN') || define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
|
||||||
defined('EXIT__AUTO_MAX') || define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
|
defined('EXIT__AUTO_MAX') || define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use \CodeIgniter\Events\Events::PRIORITY_LOW instead.
|
||||||
|
*/
|
||||||
|
define('EVENT_PRIORITY_LOW', 200);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use \CodeIgniter\Events\Events::PRIORITY_NORMAL instead.
|
||||||
|
*/
|
||||||
|
define('EVENT_PRIORITY_NORMAL', 100);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use \CodeIgniter\Events\Events::PRIORITY_HIGH instead.
|
||||||
|
*/
|
||||||
|
define('EVENT_PRIORITY_HIGH', 10);
|
||||||
|
|||||||
@ -15,38 +15,32 @@ use CodeIgniter\Config\BaseConfig;
|
|||||||
*/
|
*/
|
||||||
class ContentSecurityPolicy extends BaseConfig
|
class ContentSecurityPolicy extends BaseConfig
|
||||||
{
|
{
|
||||||
//-------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
// Broadbrush CSP management
|
// Broadbrush CSP management
|
||||||
//-------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default CSP report context
|
* Default CSP report context
|
||||||
*
|
|
||||||
* @var bool
|
|
||||||
*/
|
*/
|
||||||
public $reportOnly = false;
|
public bool $reportOnly = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specifies a URL where a browser will send reports
|
* Specifies a URL where a browser will send reports
|
||||||
* when a content security policy is violated.
|
* when a content security policy is violated.
|
||||||
*
|
|
||||||
* @var string|null
|
|
||||||
*/
|
*/
|
||||||
public $reportURI;
|
public ?string $reportURI = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instructs user agents to rewrite URL schemes, changing
|
* Instructs user agents to rewrite URL schemes, changing
|
||||||
* HTTP to HTTPS. This directive is for websites with
|
* HTTP to HTTPS. This directive is for websites with
|
||||||
* large numbers of old URLs that need to be rewritten.
|
* large numbers of old URLs that need to be rewritten.
|
||||||
*
|
|
||||||
* @var bool
|
|
||||||
*/
|
*/
|
||||||
public $upgradeInsecureRequests = false;
|
public bool $upgradeInsecureRequests = false;
|
||||||
|
|
||||||
//-------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
// Sources allowed
|
// Sources allowed
|
||||||
// Note: once you set a policy to 'none', it cannot be further restricted
|
// NOTE: once you set a policy to 'none', it cannot be further restricted
|
||||||
//-------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Will default to self if not overridden
|
* Will default to self if not overridden
|
||||||
@ -164,4 +158,19 @@ class ContentSecurityPolicy extends BaseConfig
|
|||||||
* @var string|string[]|null
|
* @var string|string[]|null
|
||||||
*/
|
*/
|
||||||
public $sandbox;
|
public $sandbox;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Nonce tag for style
|
||||||
|
*/
|
||||||
|
public string $styleNonceTag = '{csp-style-nonce}';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Nonce tag for script
|
||||||
|
*/
|
||||||
|
public string $scriptNonceTag = '{csp-script-nonce}';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Replace nonce tag automatically
|
||||||
|
*/
|
||||||
|
public bool $autoNonce = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
namespace Config;
|
namespace Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @immutable
|
||||||
|
*/
|
||||||
class DocTypes
|
class DocTypes
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -9,7 +12,7 @@ class DocTypes
|
|||||||
*
|
*
|
||||||
* @var array<string, string>
|
* @var array<string, string>
|
||||||
*/
|
*/
|
||||||
public $list = [
|
public array $list = [
|
||||||
'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
|
'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
|
||||||
'xhtml1-strict' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
|
'xhtml1-strict' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
|
||||||
'xhtml1-trans' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
|
'xhtml1-trans' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
|
||||||
@ -30,4 +33,14 @@ class DocTypes
|
|||||||
'xhtml-rdfa-1' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">',
|
'xhtml-rdfa-1' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">',
|
||||||
'xhtml-rdfa-2' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">',
|
'xhtml-rdfa-2' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether to remove the solidus (`/`) character for void HTML elements (e.g. `<input>`)
|
||||||
|
* for HTML5 compatibility.
|
||||||
|
*
|
||||||
|
* Set to:
|
||||||
|
* `true` - to be HTML5 compatible
|
||||||
|
* `false` - to be XHTML compatible
|
||||||
|
*/
|
||||||
|
public bool $html5 = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,165 +6,116 @@ use CodeIgniter\Config\BaseConfig;
|
|||||||
|
|
||||||
class Email extends BaseConfig
|
class Email extends BaseConfig
|
||||||
{
|
{
|
||||||
/**
|
public string $fromEmail = 'safekat@imnavajas.es';
|
||||||
* @var string
|
public string $fromName = 'Safekat ERP';
|
||||||
*/
|
public string $recipients = '';
|
||||||
public $fromEmail;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
public $fromName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
public $recipients;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The "user agent"
|
* The "user agent"
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $userAgent = 'Safekat ERP';
|
public string $userAgent = 'Safekat SL';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The mail sending protocol: mail, sendmail, smtp
|
* The mail sending protocol: mail, sendmail, smtp
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $protocol = 'smtp';
|
public string $protocol = 'smtp';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The server path to Sendmail.
|
* The server path to Sendmail.
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $mailPath = '/usr/sbin/sendmail';
|
public string $mailPath = '/usr/sbin/sendmail';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SMTP Server Address
|
* SMTP Server Hostname
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $SMTPHost = "imnavajas.es";
|
public string $SMTPHost = 'imnavajas.es';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SMTP Username
|
* SMTP Username
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $SMTPUser = "safekat@imnavajas.es";
|
public string $SMTPUser = 'safekat@imnavajas.es';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SMTP Password
|
* SMTP Password
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $SMTPPass = "Etkd9~448";
|
public string $SMTPPass = 'Etkd9~448';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SMTP Port
|
* SMTP Port
|
||||||
*
|
|
||||||
* @var int
|
|
||||||
*/
|
*/
|
||||||
public $SMTPPort = 25;
|
public int $SMTPPort = 25;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SMTP Timeout (in seconds)
|
* SMTP Timeout (in seconds)
|
||||||
*
|
|
||||||
* @var int
|
|
||||||
*/
|
*/
|
||||||
public $SMTPTimeout = 5;
|
public int $SMTPTimeout = 5;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable persistent SMTP connections
|
* Enable persistent SMTP connections
|
||||||
*
|
|
||||||
* @var bool
|
|
||||||
*/
|
*/
|
||||||
public $SMTPKeepAlive = false;
|
public bool $SMTPKeepAlive = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SMTP Encryption. Either tls or ssl
|
* SMTP Encryption.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string '', 'tls' or 'ssl'. 'tls' will issue a STARTTLS command
|
||||||
|
* to the server. 'ssl' means implicit SSL. Connection on port
|
||||||
|
* 465 should set this to ''.
|
||||||
*/
|
*/
|
||||||
public $SMTPCrypto = 'tls';
|
public string $SMTPCrypto = 'tls';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable word-wrap
|
* Enable word-wrap
|
||||||
*
|
|
||||||
* @var bool
|
|
||||||
*/
|
*/
|
||||||
public $wordWrap = true;
|
public bool $wordWrap = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Character count to wrap at
|
* Character count to wrap at
|
||||||
*
|
|
||||||
* @var int
|
|
||||||
*/
|
*/
|
||||||
public $wrapChars = 76;
|
public int $wrapChars = 76;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Type of mail, either 'text' or 'html'
|
* Type of mail, either 'text' or 'html'
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $mailType = 'html';
|
public string $mailType = 'html';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Character set (utf-8, iso-8859-1, etc.)
|
* Character set (utf-8, iso-8859-1, etc.)
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $charset = 'UTF-8';
|
public string $charset = 'UTF-8';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether to validate the email address
|
* Whether to validate the email address
|
||||||
*
|
|
||||||
* @var bool
|
|
||||||
*/
|
*/
|
||||||
public $validate = false;
|
public bool $validate = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Email Priority. 1 = highest. 5 = lowest. 3 = normal
|
* Email Priority. 1 = highest. 5 = lowest. 3 = normal
|
||||||
*
|
|
||||||
* @var int
|
|
||||||
*/
|
*/
|
||||||
public $priority = 3;
|
public int $priority = 3;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Newline character. (Use “\r\n” to comply with RFC 822)
|
* Newline character. (Use “\r\n” to comply with RFC 822)
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $CRLF = "\r\n";
|
public string $CRLF = "\r\n";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Newline character. (Use “\r\n” to comply with RFC 822)
|
* Newline character. (Use “\r\n” to comply with RFC 822)
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $newline = "\r\n";
|
public string $newline = "\r\n";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable BCC Batch Mode.
|
* Enable BCC Batch Mode.
|
||||||
*
|
|
||||||
* @var bool
|
|
||||||
*/
|
*/
|
||||||
public $BCCBatchMode = false;
|
public bool $BCCBatchMode = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Number of emails in each BCC batch
|
* Number of emails in each BCC batch
|
||||||
*
|
|
||||||
* @var int
|
|
||||||
*/
|
*/
|
||||||
public $BCCBatchSize = 200;
|
public int $BCCBatchSize = 200;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable notify message from server
|
* Enable notify message from server
|
||||||
*
|
|
||||||
* @var bool
|
|
||||||
*/
|
*/
|
||||||
public $DSN = false;
|
public bool $DSN = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,10 +20,8 @@ class Encryption extends BaseConfig
|
|||||||
* If you use the Encryption class you must set an encryption key (seed).
|
* If you use the Encryption class you must set an encryption key (seed).
|
||||||
* You need to ensure it is long enough for the cipher and mode you plan to use.
|
* You need to ensure it is long enough for the cipher and mode you plan to use.
|
||||||
* See the user guide for more info.
|
* See the user guide for more info.
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $key = '';
|
public string $key = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
@ -35,10 +33,8 @@ class Encryption extends BaseConfig
|
|||||||
* Available drivers:
|
* Available drivers:
|
||||||
* - OpenSSL
|
* - OpenSSL
|
||||||
* - Sodium
|
* - Sodium
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $driver = 'OpenSSL';
|
public string $driver = 'OpenSSL';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
@ -49,10 +45,8 @@ class Encryption extends BaseConfig
|
|||||||
* before it is encrypted. This value should be greater than zero.
|
* before it is encrypted. This value should be greater than zero.
|
||||||
*
|
*
|
||||||
* See the user guide for more information on padding.
|
* See the user guide for more information on padding.
|
||||||
*
|
|
||||||
* @var int
|
|
||||||
*/
|
*/
|
||||||
public $blockSize = 16;
|
public int $blockSize = 16;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
@ -60,8 +54,39 @@ class Encryption extends BaseConfig
|
|||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* HMAC digest to use, e.g. 'SHA512' or 'SHA256'. Default value is 'SHA512'.
|
* HMAC digest to use, e.g. 'SHA512' or 'SHA256'. Default value is 'SHA512'.
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $digest = 'SHA512';
|
public string $digest = 'SHA512';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the cipher-text should be raw. If set to false, then it will be base64 encoded.
|
||||||
|
* This setting is only used by OpenSSLHandler.
|
||||||
|
*
|
||||||
|
* Set to false for CI3 Encryption compatibility.
|
||||||
|
*/
|
||||||
|
public bool $rawData = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encryption key info.
|
||||||
|
* This setting is only used by OpenSSLHandler.
|
||||||
|
*
|
||||||
|
* Set to 'encryption' for CI3 Encryption compatibility.
|
||||||
|
*/
|
||||||
|
public string $encryptKeyInfo = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Authentication key info.
|
||||||
|
* This setting is only used by OpenSSLHandler.
|
||||||
|
*
|
||||||
|
* Set to 'authentication' for CI3 Encryption compatibility.
|
||||||
|
*/
|
||||||
|
public string $authKeyInfo = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cipher to use.
|
||||||
|
* This setting is only used by OpenSSLHandler.
|
||||||
|
*
|
||||||
|
* Set to 'AES-128-CBC' to decrypt encrypted data that encrypted
|
||||||
|
* by CI3 Encryption default configuration.
|
||||||
|
*/
|
||||||
|
public string $cipher = 'AES-256-CTR';
|
||||||
}
|
}
|
||||||
|
|||||||
30
ci4/app/Config/Feature.php
Normal file
30
ci4/app/Config/Feature.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\BaseConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable/disable backward compatibility breaking features.
|
||||||
|
*/
|
||||||
|
class Feature extends BaseConfig
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Enable multiple filters for a route or not.
|
||||||
|
*
|
||||||
|
* If you enable this:
|
||||||
|
* - CodeIgniter\CodeIgniter::handleRequest() uses:
|
||||||
|
* - CodeIgniter\Filters\Filters::enableFilters(), instead of enableFilter()
|
||||||
|
* - CodeIgniter\CodeIgniter::tryToRouteIt() uses:
|
||||||
|
* - CodeIgniter\Router\Router::getFilters(), instead of getFilter()
|
||||||
|
* - CodeIgniter\Router\Router::handle() uses:
|
||||||
|
* - property $filtersInfo, instead of $filterInfo
|
||||||
|
* - CodeIgniter\Router\RouteCollection::getFiltersForRoute(), instead of getFilterForRoute()
|
||||||
|
*/
|
||||||
|
public bool $multipleFilters = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use improved new auto routing instead of the default legacy version.
|
||||||
|
*/
|
||||||
|
public bool $autoRoutesImproved = false;
|
||||||
|
}
|
||||||
@ -4,6 +4,9 @@ namespace Config;
|
|||||||
|
|
||||||
use CodeIgniter\Config\ForeignCharacters as BaseForeignCharacters;
|
use CodeIgniter\Config\ForeignCharacters as BaseForeignCharacters;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @immutable
|
||||||
|
*/
|
||||||
class ForeignCharacters extends BaseForeignCharacters
|
class ForeignCharacters extends BaseForeignCharacters
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,8 @@ namespace Config;
|
|||||||
|
|
||||||
use CodeIgniter\Config\BaseConfig;
|
use CodeIgniter\Config\BaseConfig;
|
||||||
use CodeIgniter\Format\FormatterInterface;
|
use CodeIgniter\Format\FormatterInterface;
|
||||||
|
use CodeIgniter\Format\JSONFormatter;
|
||||||
|
use CodeIgniter\Format\XMLFormatter;
|
||||||
|
|
||||||
class Format extends BaseConfig
|
class Format extends BaseConfig
|
||||||
{
|
{
|
||||||
@ -22,7 +24,7 @@ class Format extends BaseConfig
|
|||||||
*
|
*
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
public $supportedResponseFormats = [
|
public array $supportedResponseFormats = [
|
||||||
'application/json',
|
'application/json',
|
||||||
'application/xml', // machine-readable XML
|
'application/xml', // machine-readable XML
|
||||||
'text/xml', // human-readable XML
|
'text/xml', // human-readable XML
|
||||||
@ -39,10 +41,10 @@ class Format extends BaseConfig
|
|||||||
*
|
*
|
||||||
* @var array<string, string>
|
* @var array<string, string>
|
||||||
*/
|
*/
|
||||||
public $formatters = [
|
public array $formatters = [
|
||||||
'application/json' => 'CodeIgniter\Format\JSONFormatter',
|
'application/json' => JSONFormatter::class,
|
||||||
'application/xml' => 'CodeIgniter\Format\XMLFormatter',
|
'application/xml' => XMLFormatter::class,
|
||||||
'text/xml' => 'CodeIgniter\Format\XMLFormatter',
|
'text/xml' => XMLFormatter::class,
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -55,7 +57,7 @@ class Format extends BaseConfig
|
|||||||
*
|
*
|
||||||
* @var array<string, int>
|
* @var array<string, int>
|
||||||
*/
|
*/
|
||||||
public $formatterOptions = [
|
public array $formatterOptions = [
|
||||||
'application/json' => JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES,
|
'application/json' => JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES,
|
||||||
'application/xml' => 0,
|
'application/xml' => 0,
|
||||||
'text/xml' => 0,
|
'text/xml' => 0,
|
||||||
|
|||||||
@ -25,8 +25,11 @@ class Generators extends BaseConfig
|
|||||||
*
|
*
|
||||||
* @var array<string, string>
|
* @var array<string, string>
|
||||||
*/
|
*/
|
||||||
public $views = [
|
public array $views = [
|
||||||
|
'make:cell' => 'CodeIgniter\Commands\Generators\Views\cell.tpl.php',
|
||||||
|
'make:cell_view' => 'CodeIgniter\Commands\Generators\Views\cell_view.tpl.php',
|
||||||
'make:command' => 'CodeIgniter\Commands\Generators\Views\command.tpl.php',
|
'make:command' => 'CodeIgniter\Commands\Generators\Views\command.tpl.php',
|
||||||
|
'make:config' => 'CodeIgniter\Commands\Generators\Views\config.tpl.php',
|
||||||
'make:controller' => 'CodeIgniter\Commands\Generators\Views\controller.tpl.php',
|
'make:controller' => 'CodeIgniter\Commands\Generators\Views\controller.tpl.php',
|
||||||
'make:entity' => 'CodeIgniter\Commands\Generators\Views\entity.tpl.php',
|
'make:entity' => 'CodeIgniter\Commands\Generators\Views\entity.tpl.php',
|
||||||
'make:filter' => 'CodeIgniter\Commands\Generators\Views\filter.tpl.php',
|
'make:filter' => 'CodeIgniter\Commands\Generators\Views\filter.tpl.php',
|
||||||
|
|||||||
@ -8,36 +8,35 @@ class Honeypot extends BaseConfig
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Makes Honeypot visible or not to human
|
* Makes Honeypot visible or not to human
|
||||||
*
|
|
||||||
* @var bool
|
|
||||||
*/
|
*/
|
||||||
public $hidden = true;
|
public bool $hidden = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Honeypot Label Content
|
* Honeypot Label Content
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $label = 'Fill This Field';
|
public string $label = 'Fill This Field';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Honeypot Field Name
|
* Honeypot Field Name
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $name = 'honeypot';
|
public string $name = 'honeypot';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Honeypot HTML Template
|
* Honeypot HTML Template
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $template = '<label>{label}</label><input type="text" name="{name}" value=""/>';
|
public string $template = '<label>{label}</label><input type="text" name="{name}" value="">';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Honeypot container
|
* Honeypot container
|
||||||
*
|
*
|
||||||
* @var string
|
* If you enabled CSP, you can remove `style="display:none"`.
|
||||||
*/
|
*/
|
||||||
public $container = '<div style="display:none">{template}</div>';
|
public string $container = '<div style="display:none">{template}</div>';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The id attribute for Honeypot container tag
|
||||||
|
*
|
||||||
|
* Used when CSP is enabled.
|
||||||
|
*/
|
||||||
|
public string $containerId = 'hpc';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,25 +10,21 @@ class Images extends BaseConfig
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Default handler used if no other handler is specified.
|
* Default handler used if no other handler is specified.
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $defaultHandler = 'gd';
|
public string $defaultHandler = 'gd';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The path to the image library.
|
* The path to the image library.
|
||||||
* Required for ImageMagick, GraphicsMagick, or NetPBM.
|
* Required for ImageMagick, GraphicsMagick, or NetPBM.
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $libraryPath = '/usr/local/bin/convert';
|
public string $libraryPath = '/usr/local/bin/convert';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The available handler classes.
|
* The available handler classes.
|
||||||
*
|
*
|
||||||
* @var array<string, string>
|
* @var array<string, string>
|
||||||
*/
|
*/
|
||||||
public $handlers = [
|
public array $handlers = [
|
||||||
'gd' => GDHandler::class,
|
'gd' => GDHandler::class,
|
||||||
'imagick' => ImageMagickHandler::class,
|
'imagick' => ImageMagickHandler::class,
|
||||||
];
|
];
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
namespace Config;
|
namespace Config;
|
||||||
|
|
||||||
use CodeIgniter\Config\BaseConfig;
|
use CodeIgniter\Config\BaseConfig;
|
||||||
|
use CodeIgniter\Log\Handlers\FileHandler;
|
||||||
|
|
||||||
class Logger extends BaseConfig
|
class Logger extends BaseConfig
|
||||||
{
|
{
|
||||||
@ -37,7 +38,7 @@ class Logger extends BaseConfig
|
|||||||
*
|
*
|
||||||
* @var array|int
|
* @var array|int
|
||||||
*/
|
*/
|
||||||
public $threshold = 4;
|
public $threshold = (ENVIRONMENT === 'production') ? 4 : 9;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
@ -46,10 +47,8 @@ class Logger extends BaseConfig
|
|||||||
*
|
*
|
||||||
* Each item that is logged has an associated date. You can use PHP date
|
* Each item that is logged has an associated date. You can use PHP date
|
||||||
* codes to set your own date formatting
|
* codes to set your own date formatting
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $dateFormat = 'Y-m-d H:i:s';
|
public string $dateFormat = 'Y-m-d H:i:s';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
@ -73,18 +72,14 @@ class Logger extends BaseConfig
|
|||||||
*
|
*
|
||||||
* Handlers are executed in the order defined in this array, starting with
|
* Handlers are executed in the order defined in this array, starting with
|
||||||
* the handler on top and continuing down.
|
* the handler on top and continuing down.
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
*/
|
||||||
public $handlers = [
|
public array $handlers = [
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* --------------------------------------------------------------------
|
* --------------------------------------------------------------------
|
||||||
* File Handler
|
* File Handler
|
||||||
* --------------------------------------------------------------------
|
* --------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
'CodeIgniter\Log\Handlers\FileHandler' => [
|
FileHandler::class => [
|
||||||
|
|
||||||
// The log levels that this handler will handle.
|
// The log levels that this handler will handle.
|
||||||
'handles' => [
|
'handles' => [
|
||||||
'critical',
|
'critical',
|
||||||
@ -102,7 +97,7 @@ class Logger extends BaseConfig
|
|||||||
* An extension of 'php' allows for protecting the log files via basic
|
* An extension of 'php' allows for protecting the log files via basic
|
||||||
* scripting, when they are to be stored under a publicly accessible directory.
|
* scripting, when they are to be stored under a publicly accessible directory.
|
||||||
*
|
*
|
||||||
* Note: Leaving it blank will default to 'log'.
|
* NOTE: Leaving it blank will default to 'log'.
|
||||||
*/
|
*/
|
||||||
'fileExtension' => '',
|
'fileExtension' => '',
|
||||||
|
|
||||||
@ -140,14 +135,14 @@ class Logger extends BaseConfig
|
|||||||
* Uncomment this block to use it.
|
* Uncomment this block to use it.
|
||||||
*/
|
*/
|
||||||
// 'CodeIgniter\Log\Handlers\ErrorlogHandler' => [
|
// 'CodeIgniter\Log\Handlers\ErrorlogHandler' => [
|
||||||
// /* The log levels this handler can handle. */
|
// /* The log levels this handler can handle. */
|
||||||
// 'handles' => ['critical', 'alert', 'emergency', 'debug', 'error', 'info', 'notice', 'warning'],
|
// 'handles' => ['critical', 'alert', 'emergency', 'debug', 'error', 'info', 'notice', 'warning'],
|
||||||
//
|
//
|
||||||
// /*
|
// /*
|
||||||
// * The message type where the error should go. Can be 0 or 4, or use the
|
// * The message type where the error should go. Can be 0 or 4, or use the
|
||||||
// * class constants: `ErrorlogHandler::TYPE_OS` (0) or `ErrorlogHandler::TYPE_SAPI` (4)
|
// * class constants: `ErrorlogHandler::TYPE_OS` (0) or `ErrorlogHandler::TYPE_SAPI` (4)
|
||||||
// */
|
// */
|
||||||
// 'messageType' => 0,
|
// 'messageType' => 0,
|
||||||
// ],
|
// ],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,10 +15,8 @@ class Migrations extends BaseConfig
|
|||||||
*
|
*
|
||||||
* You should enable migrations whenever you intend to do a schema migration
|
* You should enable migrations whenever you intend to do a schema migration
|
||||||
* and disable it back when you're done.
|
* and disable it back when you're done.
|
||||||
*
|
|
||||||
* @var bool
|
|
||||||
*/
|
*/
|
||||||
public $enabled = true;
|
public bool $enabled = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
@ -27,13 +25,9 @@ class Migrations extends BaseConfig
|
|||||||
*
|
*
|
||||||
* This is the name of the table that will store the current migrations state.
|
* This is the name of the table that will store the current migrations state.
|
||||||
* When migrations runs it will store in a database table which migration
|
* When migrations runs it will store in a database table which migration
|
||||||
* level the system is at. It then compares the migration level in this
|
* files have already been run.
|
||||||
* table to the $config['migration_version'] if they are not the same it
|
|
||||||
* will migrate up. This must be set.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $table = 'migrations';
|
public string $table = 'migrations';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
@ -42,14 +36,15 @@ class Migrations extends BaseConfig
|
|||||||
*
|
*
|
||||||
* This is the format that will be used when creating new migrations
|
* This is the format that will be used when creating new migrations
|
||||||
* using the CLI command:
|
* using the CLI command:
|
||||||
* > php spark migrate:create
|
* > php spark make:migration
|
||||||
*
|
*
|
||||||
* Typical formats:
|
* NOTE: if you set an unsupported format, migration runner will not find
|
||||||
|
* your migration files.
|
||||||
|
*
|
||||||
|
* Supported formats:
|
||||||
* - YmdHis_
|
* - YmdHis_
|
||||||
* - Y-m-d-His_
|
* - Y-m-d-His_
|
||||||
* - Y_m_d_His_
|
* - Y_m_d_His_
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $timestampFormat = 'Y-m-d-His_';
|
public string $timestampFormat = 'Y-m-d-His_';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,15 +15,15 @@ namespace Config;
|
|||||||
*
|
*
|
||||||
* When working with mime types, please make sure you have the ´fileinfo´
|
* When working with mime types, please make sure you have the ´fileinfo´
|
||||||
* extension enabled to reliably detect the media types.
|
* extension enabled to reliably detect the media types.
|
||||||
|
*
|
||||||
|
* @immutable
|
||||||
*/
|
*/
|
||||||
class Mimes
|
class Mimes
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Map of extensions to mime types.
|
* Map of extensions to mime types.
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
*/
|
||||||
public static $mimes = [
|
public static array $mimes = [
|
||||||
'hqx' => [
|
'hqx' => [
|
||||||
'application/mac-binhex40',
|
'application/mac-binhex40',
|
||||||
'application/mac-binhex',
|
'application/mac-binhex',
|
||||||
@ -55,6 +55,8 @@ class Mimes
|
|||||||
'lzh' => 'application/octet-stream',
|
'lzh' => 'application/octet-stream',
|
||||||
'exe' => [
|
'exe' => [
|
||||||
'application/octet-stream',
|
'application/octet-stream',
|
||||||
|
'application/vnd.microsoft.portable-executable',
|
||||||
|
'application/x-dosexec',
|
||||||
'application/x-msdownload',
|
'application/x-msdownload',
|
||||||
],
|
],
|
||||||
'class' => 'application/octet-stream',
|
'class' => 'application/octet-stream',
|
||||||
@ -102,8 +104,6 @@ class Mimes
|
|||||||
],
|
],
|
||||||
'pptx' => [
|
'pptx' => [
|
||||||
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
||||||
'application/x-zip',
|
|
||||||
'application/zip',
|
|
||||||
],
|
],
|
||||||
'wbxml' => 'application/wbxml',
|
'wbxml' => 'application/wbxml',
|
||||||
'wmlc' => 'application/wmlc',
|
'wmlc' => 'application/wmlc',
|
||||||
@ -260,6 +260,7 @@ class Mimes
|
|||||||
'image/png',
|
'image/png',
|
||||||
'image/x-png',
|
'image/x-png',
|
||||||
],
|
],
|
||||||
|
'webp' => 'image/webp',
|
||||||
'tif' => 'image/tiff',
|
'tif' => 'image/tiff',
|
||||||
'tiff' => 'image/tiff',
|
'tiff' => 'image/tiff',
|
||||||
'css' => [
|
'css' => [
|
||||||
@ -509,22 +510,21 @@ class Mimes
|
|||||||
{
|
{
|
||||||
$type = trim(strtolower($type), '. ');
|
$type = trim(strtolower($type), '. ');
|
||||||
|
|
||||||
$proposedExtension = trim(strtolower($proposedExtension));
|
$proposedExtension = trim(strtolower($proposedExtension ?? ''));
|
||||||
|
|
||||||
if ($proposedExtension !== '') {
|
if (
|
||||||
if (array_key_exists($proposedExtension, static::$mimes) && in_array($type, is_string(static::$mimes[$proposedExtension]) ? [static::$mimes[$proposedExtension]] : static::$mimes[$proposedExtension], true)) {
|
$proposedExtension !== ''
|
||||||
// The detected mime type matches with the proposed extension.
|
&& array_key_exists($proposedExtension, static::$mimes)
|
||||||
return $proposedExtension;
|
&& in_array($type, (array) static::$mimes[$proposedExtension], true)
|
||||||
}
|
) {
|
||||||
|
// The detected mime type matches with the proposed extension.
|
||||||
// An extension was proposed, but the media type does not match the mime type list.
|
return $proposedExtension;
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reverse check the mime type list if no extension was proposed.
|
// Reverse check the mime type list if no extension was proposed.
|
||||||
// This search is order sensitive!
|
// This search is order sensitive!
|
||||||
foreach (static::$mimes as $ext => $types) {
|
foreach (static::$mimes as $ext => $types) {
|
||||||
if ((is_string($types) && $types === $type) || (is_array($types) && in_array($type, $types, true))) {
|
if (in_array($type, (array) $types, true)) {
|
||||||
return $ext;
|
return $ext;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,14 @@ namespace Config;
|
|||||||
|
|
||||||
use CodeIgniter\Modules\Modules as BaseModules;
|
use CodeIgniter\Modules\Modules as BaseModules;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Modules Configuration.
|
||||||
|
*
|
||||||
|
* NOTE: This class is required prior to Autoloader instantiation,
|
||||||
|
* and does not extend BaseConfig.
|
||||||
|
*
|
||||||
|
* @immutable
|
||||||
|
*/
|
||||||
class Modules extends BaseModules
|
class Modules extends BaseModules
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -31,6 +39,29 @@ class Modules extends BaseModules
|
|||||||
*/
|
*/
|
||||||
public $discoverInComposer = true;
|
public $discoverInComposer = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Composer package list for Auto-Discovery
|
||||||
|
* This setting is optional.
|
||||||
|
*
|
||||||
|
* E.g.:
|
||||||
|
* [
|
||||||
|
* 'only' => [
|
||||||
|
* // List up all packages to auto-discover
|
||||||
|
* 'codeigniter4/shield',
|
||||||
|
* ],
|
||||||
|
* ]
|
||||||
|
* or
|
||||||
|
* [
|
||||||
|
* 'exclude' => [
|
||||||
|
* // List up packages to exclude.
|
||||||
|
* 'pestphp/pest',
|
||||||
|
* ],
|
||||||
|
* ]
|
||||||
|
*
|
||||||
|
* @var array{only?: list<string>, exclude?: list<string>}
|
||||||
|
*/
|
||||||
|
public $composerPackages = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
* Auto-Discovery Rules
|
* Auto-Discovery Rules
|
||||||
@ -41,7 +72,7 @@ class Modules extends BaseModules
|
|||||||
*
|
*
|
||||||
* If it is not listed, only the base application elements will be used.
|
* If it is not listed, only the base application elements will be used.
|
||||||
*
|
*
|
||||||
* @var string[]
|
* @var list<string>
|
||||||
*/
|
*/
|
||||||
public $aliases = [
|
public $aliases = [
|
||||||
'events',
|
'events',
|
||||||
|
|||||||
@ -20,7 +20,7 @@ class Pager extends BaseConfig
|
|||||||
*
|
*
|
||||||
* @var array<string, string>
|
* @var array<string, string>
|
||||||
*/
|
*/
|
||||||
public $templates = [
|
public array $templates = [
|
||||||
'default_full' => 'CodeIgniter\Pager\Views\default_full',
|
'default_full' => 'CodeIgniter\Pager\Views\default_full',
|
||||||
'default_simple' => 'CodeIgniter\Pager\Views\default_simple',
|
'default_simple' => 'CodeIgniter\Pager\Views\default_simple',
|
||||||
'default_head' => 'CodeIgniter\Pager\Views\default_head',
|
'default_head' => 'CodeIgniter\Pager\Views\default_head',
|
||||||
@ -32,8 +32,6 @@ class Pager extends BaseConfig
|
|||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* The default number of results shown in a single page.
|
* The default number of results shown in a single page.
|
||||||
*
|
|
||||||
* @var int
|
|
||||||
*/
|
*/
|
||||||
public $perPage = 20;
|
public int $perPage = 20;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,10 +22,8 @@ class Paths
|
|||||||
*
|
*
|
||||||
* This must contain the name of your "system" folder. Include
|
* This must contain the name of your "system" folder. Include
|
||||||
* the path if the folder is not in the same directory as this file.
|
* the path if the folder is not in the same directory as this file.
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $systemDirectory = __DIR__ . '/../../vendor/codeigniter4/framework/system';
|
public string $systemDirectory = __DIR__ . '/../../vendor/codeigniter4/framework/system';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ---------------------------------------------------------------
|
* ---------------------------------------------------------------
|
||||||
@ -34,14 +32,12 @@ class Paths
|
|||||||
*
|
*
|
||||||
* If you want this front controller to use a different "app"
|
* If you want this front controller to use a different "app"
|
||||||
* folder than the default one you can set its name here. The folder
|
* folder than the default one you can set its name here. The folder
|
||||||
* can also be renamed or relocated anywhere on your getServer. If
|
* can also be renamed or relocated anywhere on your server. If
|
||||||
* you do, use a full getServer path.
|
* you do, use a full server path.
|
||||||
*
|
*
|
||||||
* @see http://codeigniter.com/user_guide/general/managing_apps.html
|
* @see http://codeigniter.com/user_guide/general/managing_apps.html
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $appDirectory = __DIR__ . '/..';
|
public string $appDirectory = __DIR__ . '/..';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ---------------------------------------------------------------
|
* ---------------------------------------------------------------
|
||||||
@ -53,10 +49,8 @@ class Paths
|
|||||||
* need write permission to a single place that can be tucked away
|
* need write permission to a single place that can be tucked away
|
||||||
* for maximum security, keeping it out of the app and/or
|
* for maximum security, keeping it out of the app and/or
|
||||||
* system directories.
|
* system directories.
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $writableDirectory = __DIR__ . '/../../writable';
|
public string $writableDirectory = __DIR__ . '/../../writable';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ---------------------------------------------------------------
|
* ---------------------------------------------------------------
|
||||||
@ -64,10 +58,8 @@ class Paths
|
|||||||
* ---------------------------------------------------------------
|
* ---------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* This variable must contain the name of your "tests" directory.
|
* This variable must contain the name of your "tests" directory.
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $testsDirectory = __DIR__ . '/../../tests';
|
public string $testsDirectory = __DIR__ . '/../../tests';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ---------------------------------------------------------------
|
* ---------------------------------------------------------------
|
||||||
@ -78,8 +70,6 @@ class Paths
|
|||||||
* contains the view files used by your application. By
|
* contains the view files used by your application. By
|
||||||
* default this is in `app/Views`. This value
|
* default this is in `app/Views`. This value
|
||||||
* is used when no value is provided to `Services::renderer()`.
|
* is used when no value is provided to `Services::renderer()`.
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $viewDirectory = __DIR__ . '/../Views';
|
public string $viewDirectory = __DIR__ . '/../Views';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,7 +23,7 @@ class UserAgents extends BaseConfig
|
|||||||
*
|
*
|
||||||
* @var array<string, string>
|
* @var array<string, string>
|
||||||
*/
|
*/
|
||||||
public $platforms = [
|
public array $platforms = [
|
||||||
'windows nt 10.0' => 'Windows 10',
|
'windows nt 10.0' => 'Windows 10',
|
||||||
'windows nt 6.3' => 'Windows 8.1',
|
'windows nt 6.3' => 'Windows 8.1',
|
||||||
'windows nt 6.2' => 'Windows 8',
|
'windows nt 6.2' => 'Windows 8',
|
||||||
@ -78,7 +78,7 @@ class UserAgents extends BaseConfig
|
|||||||
*
|
*
|
||||||
* @var array<string, string>
|
* @var array<string, string>
|
||||||
*/
|
*/
|
||||||
public $browsers = [
|
public array $browsers = [
|
||||||
'OPR' => 'Opera',
|
'OPR' => 'Opera',
|
||||||
'Flock' => 'Flock',
|
'Flock' => 'Flock',
|
||||||
'Edge' => 'Spartan',
|
'Edge' => 'Spartan',
|
||||||
@ -119,7 +119,7 @@ class UserAgents extends BaseConfig
|
|||||||
*
|
*
|
||||||
* @var array<string, string>
|
* @var array<string, string>
|
||||||
*/
|
*/
|
||||||
public $mobiles = [
|
public array $mobiles = [
|
||||||
// legacy array, old values commented out
|
// legacy array, old values commented out
|
||||||
'mobileexplorer' => 'Mobile Explorer',
|
'mobileexplorer' => 'Mobile Explorer',
|
||||||
// 'openwave' => 'Open Wave',
|
// 'openwave' => 'Open Wave',
|
||||||
@ -228,7 +228,7 @@ class UserAgents extends BaseConfig
|
|||||||
*
|
*
|
||||||
* @var array<string, string>
|
* @var array<string, string>
|
||||||
*/
|
*/
|
||||||
public $robots = [
|
public array $robots = [
|
||||||
'googlebot' => 'Googlebot',
|
'googlebot' => 'Googlebot',
|
||||||
'msnbot' => 'MSNBot',
|
'msnbot' => 'MSNBot',
|
||||||
'baiduspider' => 'Baiduspider',
|
'baiduspider' => 'Baiduspider',
|
||||||
|
|||||||
@ -2,18 +2,17 @@
|
|||||||
|
|
||||||
namespace Config;
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\BaseConfig;
|
||||||
|
use CodeIgniter\Validation\StrictRules\CreditCardRules;
|
||||||
|
use CodeIgniter\Validation\StrictRules\FileRules;
|
||||||
|
use CodeIgniter\Validation\StrictRules\FormatRules;
|
||||||
|
use CodeIgniter\Validation\StrictRules\Rules;
|
||||||
|
|
||||||
use CodeIgniter\Shield\Authentication\Passwords\ValidationRules;
|
class Validation extends BaseConfig
|
||||||
use CodeIgniter\Validation\CreditCardRules;
|
|
||||||
use CodeIgniter\Validation\FileRules;
|
|
||||||
use CodeIgniter\Validation\FormatRules;
|
|
||||||
use CodeIgniter\Validation\Rules;
|
|
||||||
|
|
||||||
class Validation
|
|
||||||
{
|
{
|
||||||
//--------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
// Setup
|
// Setup
|
||||||
//--------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stores the classes that contain the
|
* Stores the classes that contain the
|
||||||
@ -26,7 +25,6 @@ class Validation
|
|||||||
FormatRules::class,
|
FormatRules::class,
|
||||||
FileRules::class,
|
FileRules::class,
|
||||||
CreditCardRules::class,
|
CreditCardRules::class,
|
||||||
ValidationRules::class,
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -39,44 +37,9 @@ class Validation
|
|||||||
'list' => 'CodeIgniter\Validation\Views\list',
|
'list' => 'CodeIgniter\Validation\Views\list',
|
||||||
'single' => 'CodeIgniter\Validation\Views\single',
|
'single' => 'CodeIgniter\Validation\Views\single',
|
||||||
'bootstrap_style' => 'themes/_commonPartialsBs/_form_validation_errors',
|
'bootstrap_style' => 'themes/_commonPartialsBs/_form_validation_errors',
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
// Rules
|
// Rules
|
||||||
//--------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
//--------------------------------------------------------------------
|
|
||||||
// Rules For Login
|
|
||||||
//--------------------------------------------------------------------
|
|
||||||
/*public $login = [
|
|
||||||
// 'username' => [
|
|
||||||
// 'label' => 'Auth.username',
|
|
||||||
// 'rules' => [
|
|
||||||
// 'required',
|
|
||||||
// 'max_length[30]',
|
|
||||||
// 'min_length[3]',
|
|
||||||
// 'regex_match[/\A[a-zA-Z0-9\.]+\z/]',
|
|
||||||
// ],
|
|
||||||
// ],
|
|
||||||
'email' => [
|
|
||||||
'label' => 'Auth.email',
|
|
||||||
'rules' => [
|
|
||||||
'required',
|
|
||||||
'max_length[254]',
|
|
||||||
'valid_email'
|
|
||||||
],
|
|
||||||
],
|
|
||||||
'password' => [
|
|
||||||
'label' => 'Auth.password',
|
|
||||||
'rules' => [
|
|
||||||
'required',
|
|
||||||
'max_byte[72]',
|
|
||||||
],
|
|
||||||
'errors' => [
|
|
||||||
'max_byte' => 'Auth.errorPasswordTooLongBytes',
|
|
||||||
]
|
|
||||||
],
|
|
||||||
];*/
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,12 @@
|
|||||||
namespace Config;
|
namespace Config;
|
||||||
|
|
||||||
use CodeIgniter\Config\View as BaseView;
|
use CodeIgniter\Config\View as BaseView;
|
||||||
|
use CodeIgniter\View\ViewDecoratorInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @phpstan-type ParserCallable (callable(mixed): mixed)
|
||||||
|
* @phpstan-type ParserCallableString (callable(mixed): mixed)&string
|
||||||
|
*/
|
||||||
class View extends BaseView
|
class View extends BaseView
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -29,7 +34,8 @@ class View extends BaseView
|
|||||||
* { title|esc(js) }
|
* { title|esc(js) }
|
||||||
* { created_on|date(Y-m-d)|esc(attr) }
|
* { created_on|date(Y-m-d)|esc(attr) }
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array<string, string>
|
||||||
|
* @phpstan-var array<string, ParserCallableString>
|
||||||
*/
|
*/
|
||||||
public $filters = [];
|
public $filters = [];
|
||||||
|
|
||||||
@ -38,7 +44,19 @@ class View extends BaseView
|
|||||||
* by the core Parser by creating aliases that will be replaced with
|
* by the core Parser by creating aliases that will be replaced with
|
||||||
* any callable. Can be single or tag pair.
|
* any callable. Can be single or tag pair.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array<string, array<string>|callable|string>
|
||||||
|
* @phpstan-var array<string, array<ParserCallableString>|ParserCallableString|ParserCallable>
|
||||||
*/
|
*/
|
||||||
public $plugins = [];
|
public $plugins = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* View Decorators are class methods that will be run in sequence to
|
||||||
|
* have a chance to alter the generated output just prior to caching
|
||||||
|
* the results.
|
||||||
|
*
|
||||||
|
* All classes must implement CodeIgniter\View\ViewDecoratorInterface
|
||||||
|
*
|
||||||
|
* @var class-string<ViewDecoratorInterface>[]
|
||||||
|
*/
|
||||||
|
public array $decorators = [];
|
||||||
}
|
}
|
||||||
|
|||||||
117
ci4/app/Language/en/Auth.php
Normal file
117
ci4/app/Language/en/Auth.php
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of CodeIgniter Shield.
|
||||||
|
*
|
||||||
|
* (c) CodeIgniter Foundation <admin@codeigniter.com>
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view
|
||||||
|
* the LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
return [
|
||||||
|
// Exceptions
|
||||||
|
'unknownAuthenticator' => '{0} is not a valid authenticator.',
|
||||||
|
'unknownUserProvider' => 'Unable to determine the User Provider to use.',
|
||||||
|
'invalidUser' => 'Unable to locate the specified user.',
|
||||||
|
'bannedUser' => 'Can not log you in as you are currently banned.',
|
||||||
|
'logOutBannedUser' => 'You have been logged out because you have been banned.',
|
||||||
|
'badAttempt' => 'Unable to log you in. Please check your credentials.',
|
||||||
|
'noPassword' => 'Cannot validate a user without a password.',
|
||||||
|
'invalidPassword' => 'Unable to log you in. Please check your password.',
|
||||||
|
'noToken' => 'Every request must have a bearer token in the {0} header.',
|
||||||
|
'badToken' => 'The access token is invalid.',
|
||||||
|
'oldToken' => 'The access token has expired.',
|
||||||
|
'noUserEntity' => 'User Entity must be provided for password validation.',
|
||||||
|
'invalidEmail' => 'Unable to verify the email address matches the email on record.',
|
||||||
|
'unableSendEmailToUser' => 'Sorry, there was a problem sending the email. We could not send an email to "{0}".',
|
||||||
|
'throttled' => 'Too many requests made from this IP address. You may try again in {0} seconds.',
|
||||||
|
'notEnoughPrivilege' => 'You do not have the necessary permission to perform the desired operation.',
|
||||||
|
// JWT Exceptions
|
||||||
|
'invalidJWT' => 'The token is invalid.',
|
||||||
|
'expiredJWT' => 'The token has expired.',
|
||||||
|
'beforeValidJWT' => 'The token is not yet available.',
|
||||||
|
|
||||||
|
'email' => 'Email Address',
|
||||||
|
'username' => 'Username',
|
||||||
|
'password' => 'Password',
|
||||||
|
'passwordConfirm' => 'Password (again)',
|
||||||
|
'haveAccount' => 'Already have an account?',
|
||||||
|
'token' => 'Token',
|
||||||
|
|
||||||
|
// Buttons
|
||||||
|
'confirm' => 'Confirm',
|
||||||
|
'send' => 'Send',
|
||||||
|
|
||||||
|
// Registration
|
||||||
|
'register' => 'Register',
|
||||||
|
'registerDisabled' => 'Registration is not currently allowed.',
|
||||||
|
'registerSuccess' => 'Welcome aboard!',
|
||||||
|
|
||||||
|
// Login
|
||||||
|
'login' => 'Login',
|
||||||
|
'needAccount' => 'Need an account?',
|
||||||
|
'rememberMe' => 'Remember me?',
|
||||||
|
'forgotPassword' => 'Forgot your password?',
|
||||||
|
'useMagicLink' => 'Use a Login Link',
|
||||||
|
'magicLinkSubject' => 'Your Login Link',
|
||||||
|
'magicTokenNotFound' => 'Unable to verify the link.',
|
||||||
|
'magicLinkExpired' => 'Sorry, link has expired.',
|
||||||
|
'checkYourEmail' => 'Check your email!',
|
||||||
|
'magicLinkDetails' => 'We just sent you an email with a Login link inside. It is only valid for {0} minutes.',
|
||||||
|
'magicLinkDisabled' => 'Use of MagicLink is currently not allowed.',
|
||||||
|
'successLogout' => 'You have successfully logged out.',
|
||||||
|
'backToLogin' => 'Back to Login',
|
||||||
|
|
||||||
|
// Passwords
|
||||||
|
'errorPasswordLength' => 'Passwords must be at least {0, number} characters long.',
|
||||||
|
'suggestPasswordLength' => 'Pass phrases - up to 255 characters long - make more secure passwords that are easy to remember.',
|
||||||
|
'errorPasswordCommon' => 'Password must not be a common password.',
|
||||||
|
'suggestPasswordCommon' => 'The password was checked against over 65k commonly used passwords or passwords that have been leaked through hacks.',
|
||||||
|
'errorPasswordPersonal' => 'Passwords cannot contain re-hashed personal information.',
|
||||||
|
'suggestPasswordPersonal' => 'Variations on your email address or username should not be used for passwords.',
|
||||||
|
'errorPasswordTooSimilar' => 'Password is too similar to the username.',
|
||||||
|
'suggestPasswordTooSimilar' => 'Do not use parts of your username in your password.',
|
||||||
|
'errorPasswordPwned' => 'The password {0} has been exposed due to a data breach and has been seen {1, number} times in {2} of compromised passwords.',
|
||||||
|
'suggestPasswordPwned' => '{0} should never be used as a password. If you are using it anywhere change it immediately.',
|
||||||
|
'errorPasswordEmpty' => 'A Password is required.',
|
||||||
|
'errorPasswordTooLongBytes' => 'Password cannot exceed {param} bytes in length.',
|
||||||
|
'passwordChangeSuccess' => 'Password changed successfully',
|
||||||
|
'userDoesNotExist' => 'Password was not changed. User does not exist',
|
||||||
|
'resetTokenExpired' => 'Sorry. Your reset token has expired.',
|
||||||
|
|
||||||
|
// Email Globals
|
||||||
|
'emailInfo' => 'Some information about the person:',
|
||||||
|
'emailIpAddress' => 'IP Address:',
|
||||||
|
'emailDevice' => 'Device:',
|
||||||
|
'emailDate' => 'Date:',
|
||||||
|
|
||||||
|
// 2FA
|
||||||
|
'email2FATitle' => 'Two Factor Authentication',
|
||||||
|
'confirmEmailAddress' => 'Confirm your email address.',
|
||||||
|
'emailEnterCode' => 'Confirm your Email',
|
||||||
|
'emailConfirmCode' => 'Enter the 6-digit code we just sent to your email address.',
|
||||||
|
'email2FASubject' => 'Your authentication code',
|
||||||
|
'email2FAMailBody' => 'Your authentication code is:',
|
||||||
|
'invalid2FAToken' => 'The code was incorrect.',
|
||||||
|
'need2FA' => 'You must complete a two-factor verification.',
|
||||||
|
'needVerification' => 'Check your email to complete account activation.',
|
||||||
|
|
||||||
|
// Activate
|
||||||
|
'emailActivateTitle' => 'Email Activation',
|
||||||
|
'emailActivateBody' => 'We just sent an email to you with a code to confirm your email address. Copy that code and paste it below.',
|
||||||
|
'emailActivateSubject' => 'Your activation code',
|
||||||
|
'emailActivateMailBody' => 'Please use the code below to activate your account and start using the site.',
|
||||||
|
'invalidActivateToken' => 'The code was incorrect.',
|
||||||
|
'needActivate' => 'You must complete your registration by confirming the code sent to your email address.',
|
||||||
|
'activationBlocked' => 'You must activate your account before logging in.',
|
||||||
|
|
||||||
|
// Groups
|
||||||
|
'unknownGroup' => '{0} is not a valid group.',
|
||||||
|
'missingTitle' => 'Groups must have a title.',
|
||||||
|
|
||||||
|
// Permissions
|
||||||
|
'unknownPermission' => '{0} is not a valid permission.',
|
||||||
|
];
|
||||||
117
ci4/app/Language/es/Auth.php
Normal file
117
ci4/app/Language/es/Auth.php
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of CodeIgniter Shield.
|
||||||
|
*
|
||||||
|
* (c) CodeIgniter Foundation <admin@codeigniter.com>
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view
|
||||||
|
* the LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
return [
|
||||||
|
// Excepciones
|
||||||
|
'unknownAuthenticator' => '{0} no es un autenticador válido.',
|
||||||
|
'unknownUserProvider' => 'No se puede determinar el proveedor de usuario a utilizar.',
|
||||||
|
'invalidUser' => 'No se puede localizar al usuario especificado.',
|
||||||
|
'bannedUser' => 'No puedes iniciar sesión ya que estás actualmente vetado.',
|
||||||
|
'logOutBannedUser' => 'Se ha cerrado la sesión porque se ha vetado al usuario.',
|
||||||
|
'badAttempt' => 'No se puede iniciar sesión. Por favor, comprueba tus credenciales.',
|
||||||
|
'noPassword' => 'No se puede validar un usuario sin contraseña.',
|
||||||
|
'invalidPassword' => 'No se puede iniciar sesión. Por favor, comprueba tu contraseña.',
|
||||||
|
'noToken' => 'Cada solicitud debe tener un token de portador en la cabecera {0}.',
|
||||||
|
'badToken' => 'El token de acceso no es válido.',
|
||||||
|
'oldToken' => 'El token de acceso ha caducado.',
|
||||||
|
'noUserEntity' => 'Se debe proporcionar una entidad de usuario para la validación de contraseña.',
|
||||||
|
'invalidEmail' => 'No se puede verificar que la dirección de correo electrónico coincida con la registrada.',
|
||||||
|
'unableSendEmailToUser' => 'Lo siento, hubo un problema al enviar el correo electrónico. No pudimos enviar un correo electrónico a "{0}".',
|
||||||
|
'throttled' => 'Se han realizado demasiadas solicitudes desde esta dirección IP. Puedes intentarlo de nuevo en {0} segundos.',
|
||||||
|
'notEnoughPrivilege' => 'No tienes los permisos necesarios para realizar la operación deseada.',
|
||||||
|
// JWT Exceptions
|
||||||
|
'invalidJWT' => '(To be translated) The token is invalid.',
|
||||||
|
'expiredJWT' => '(To be translated) The token has expired.',
|
||||||
|
'beforeValidJWT' => '(To be translated) The token is not yet available.',
|
||||||
|
|
||||||
|
'email' => 'Correo Electrónico',
|
||||||
|
'username' => 'Nombre de usuario',
|
||||||
|
'password' => 'Contraseña',
|
||||||
|
'passwordConfirm' => 'Contraseña (otra vez)',
|
||||||
|
'haveAccount' => '¿Ya tienes una cuenta?',
|
||||||
|
'token' => '(To be translated) Token',
|
||||||
|
|
||||||
|
// Botones
|
||||||
|
'confirm' => 'Confirmar',
|
||||||
|
'send' => 'Enviar',
|
||||||
|
|
||||||
|
// Registro
|
||||||
|
'register' => 'Registrarse',
|
||||||
|
'registerDisabled' => 'Actualmente no se permite el registro.',
|
||||||
|
'registerSuccess' => '¡Bienvenido a bordo!',
|
||||||
|
|
||||||
|
// Login
|
||||||
|
'login' => 'Iniciar sesión',
|
||||||
|
'needAccount' => '¿Necesitas una cuenta?',
|
||||||
|
'rememberMe' => 'Recordarme',
|
||||||
|
'forgotPassword' => '¿Olvidaste tu contraseña?',
|
||||||
|
'useMagicLink' => 'Usar un enlace de inicio de sesión',
|
||||||
|
'magicLinkSubject' => 'Tu enlace de inicio de sesión',
|
||||||
|
'magicTokenNotFound' => 'No se puede verificar el enlace.',
|
||||||
|
'magicLinkExpired' => 'Lo siento, el enlace ha caducado.',
|
||||||
|
'checkYourEmail' => '¡Revisa tu correo electrónico!',
|
||||||
|
'magicLinkDetails' => 'Acabamos de enviarte un correo electrónico con un enlace de inicio de sesión. Solo es válido durante {0} minutos.',
|
||||||
|
'magicLinkDisabled' => '(To be translated) Use of MagicLink is currently not allowed.',
|
||||||
|
'successLogout' => 'Has cerrado sesión correctamente.',
|
||||||
|
'backToLogin' => 'Volver al inicio de sesión',
|
||||||
|
|
||||||
|
// Contraseñas
|
||||||
|
'errorPasswordLength' => 'Las contraseñas deben tener al menos {0, number} caracteres.',
|
||||||
|
'suggestPasswordLength' => 'Las frases de contraseña, de hasta 255 caracteres de longitud, hacen que las contraseñas sean más seguras y fáciles de recordar.',
|
||||||
|
'errorPasswordCommon' => 'La contraseña no puede ser una contraseña común.',
|
||||||
|
'suggestPasswordCommon' => 'La contraseña se comprobó frente a más de 65k contraseñas comúnmente utilizadas o contraseñas que se filtraron a través de ataques.',
|
||||||
|
'errorPasswordPersonal' => 'Las contraseñas no pueden contener información personal reutilizada.',
|
||||||
|
'suggestPasswordPersonal' => 'No se deben usar variaciones de su dirección de correo electrónico o nombre de usuario como contraseña.',
|
||||||
|
'errorPasswordTooSimilar' => 'La contraseña es demasiado similar al nombre de usuario.',
|
||||||
|
'suggestPasswordTooSimilar' => 'No use partes de su nombre de usuario en su contraseña.',
|
||||||
|
'errorPasswordPwned' => 'La contraseña {0} se ha expuesto debido a una violación de datos y se ha visto {1, number} veces en {2} de contraseñas comprometidas.',
|
||||||
|
'suggestPasswordPwned' => 'Nunca se debe usar {0} como contraseña. Si lo está utilizando en algún lugar, cambie su contraseña de inmediato.',
|
||||||
|
'errorPasswordEmpty' => 'Se requiere una contraseña.',
|
||||||
|
'errorPasswordTooLongBytes' => 'La contraseña no puede tener más de {param} caracteres',
|
||||||
|
'passwordChangeSuccess' => 'Contraseña cambiada correctamente',
|
||||||
|
'userDoesNotExist' => 'La contraseña no se cambió. El usuario no existe',
|
||||||
|
'resetTokenExpired' => 'Lo siento. Su token de reinicio ha caducado.',
|
||||||
|
|
||||||
|
// Email Globals
|
||||||
|
'emailInfo' => 'Alguna información sobre la persona:',
|
||||||
|
'emailIpAddress' => 'Dirección IP:',
|
||||||
|
'emailDevice' => 'Dispositivo:',
|
||||||
|
'emailDate' => 'Fecha:',
|
||||||
|
|
||||||
|
// 2FA
|
||||||
|
'email2FATitle' => 'Autenticación de dos factores',
|
||||||
|
'confirmEmailAddress' => 'Confirma tu dirección de correo electrónico.',
|
||||||
|
'emailEnterCode' => 'Confirma tu correo electrónico',
|
||||||
|
'emailConfirmCode' => 'Ingresa el código de 6 dígitos que acabamos de enviar a tu correo electrónico.',
|
||||||
|
'email2FASubject' => 'Tu código de autenticación',
|
||||||
|
'email2FAMailBody' => 'Tu código de autenticación es:',
|
||||||
|
'invalid2FAToken' => 'El código era incorrecto.',
|
||||||
|
'need2FA' => 'Debes completar la verificación de dos factores.',
|
||||||
|
'needVerification' => 'Verifica tu correo electrónico para completar la activación de la cuenta.',
|
||||||
|
|
||||||
|
// Activar
|
||||||
|
'emailActivateTitle' => 'Activación de correo electrónico',
|
||||||
|
'emailActivateBody' => 'Acabamos de enviarte un correo electrónico con un código para confirmar tu dirección de correo electrónico. Copia ese código y pégalo a continuación.',
|
||||||
|
'emailActivateSubject' => 'Tu código de activación',
|
||||||
|
'emailActivateMailBody' => 'Utiliza el código siguiente para activar tu cuenta y comenzar a usar el sitio.',
|
||||||
|
'invalidActivateToken' => 'El código era incorrecto.',
|
||||||
|
'needActivate' => 'Debes completar tu registro confirmando el código enviado a tu dirección de correo electrónico.',
|
||||||
|
'activationBlocked' => 'Debes activar tu cuenta antes de iniciar sesión.',
|
||||||
|
|
||||||
|
// Grupos
|
||||||
|
'unknownGroup' => '{0} no es un grupo válido.',
|
||||||
|
'missingTitle' => 'Los grupos deben tener un título.',
|
||||||
|
|
||||||
|
// Permisos
|
||||||
|
'unknownPermission' => '{0} no es un permiso válido.',
|
||||||
|
];
|
||||||
@ -1,24 +1,26 @@
|
|||||||
{
|
{
|
||||||
"name": "codeigniter4/appstarter",
|
"name": "codeigniter4/appstarter",
|
||||||
"type": "project",
|
|
||||||
"description": "CodeIgniter4 starter app",
|
"description": "CodeIgniter4 starter app",
|
||||||
"homepage": "https://codeigniter.com",
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"type": "project",
|
||||||
|
"homepage": "https://codeigniter.com",
|
||||||
|
"support": {
|
||||||
|
"forum": "https://forum.codeigniter.com/",
|
||||||
|
"source": "https://github.com/codeigniter4/CodeIgniter4",
|
||||||
|
"slack": "https://codeigniterchat.slack.com"
|
||||||
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.1",
|
"php": "^8.1",
|
||||||
|
"codeigniter4/framework": "^4.0",
|
||||||
"codeigniter4/shield": "^1.0",
|
"codeigniter4/shield": "^1.0",
|
||||||
"codeigniter4/framework": "^4",
|
"dompdf/dompdf": "^2.0",
|
||||||
"phpoffice/phpspreadsheet": "^1.18",
|
//"phpoffice/phpspreadsheet": "^1.18"
|
||||||
"dompdf/dompdf": "^2.0"
|
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"fakerphp/faker": "^1.9",
|
"fakerphp/faker": "^1.9",
|
||||||
"mikey179/vfsstream": "^1.6",
|
"mikey179/vfsstream": "^1.6",
|
||||||
"phpunit/phpunit": "^9.1"
|
"phpunit/phpunit": "^9.1"
|
||||||
},
|
},
|
||||||
"suggest": {
|
|
||||||
"ext-fileinfo": "Improves mime type detection for files"
|
|
||||||
},
|
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"App\\": "app",
|
"App\\": "app",
|
||||||
@ -33,12 +35,12 @@
|
|||||||
"Tests\\Support\\": "tests/_support"
|
"Tests\\Support\\": "tests/_support"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"config": {
|
||||||
|
"optimize-autoloader": true,
|
||||||
|
"preferred-install": "dist",
|
||||||
|
"sort-packages": true
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "phpunit"
|
"test": "phpunit"
|
||||||
},
|
|
||||||
"support": {
|
|
||||||
"forum": "http://forum.codeigniter.com/",
|
|
||||||
"source": "https://github.com/codeigniter4/CodeIgniter4",
|
|
||||||
"slack": "https://codeigniterchat.slack.com"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user