diff --git a/app/.htaccess b/app/.htaccess
index f24db0acc..3462048ad 100644
--- a/app/.htaccess
+++ b/app/.htaccess
@@ -1,6 +1,6 @@
- Require all denied
+ Require all denied
- Deny from all
+ Deny from all
diff --git a/app/Config/App.php b/app/Config/App.php
index b062e7f63..3b849a44f 100644
--- a/app/Config/App.php
+++ b/app/Config/App.php
@@ -50,7 +50,7 @@ class App extends BaseConfig
* URL to your CodeIgniter root. Typically, this will be your base URL,
* WITH a trailing slash:
*
- * http://example.com/
+ * E.g., http://example.com/
*/
public string $baseURL; //Defined in the constructor
@@ -58,10 +58,10 @@ class App extends BaseConfig
* Allowed Hostnames in the Site URL other than the hostname in the baseURL.
* If you want to accept multiple Hostnames, set this.
*
- * E.g. When your site URL ($baseURL) is 'http://example.com/', and your site
- * also accepts 'http://media.example.com/' and
- * 'http://accounts.example.com/':
- * ['media.example.com', 'accounts.example.com']
+ * E.g.,
+ * When your site URL ($baseURL) is 'http://example.com/', and your site
+ * also accepts 'http://media.example.com/' and 'http://accounts.example.com/':
+ * ['media.example.com', 'accounts.example.com']
*
* @var list
*/
@@ -72,9 +72,9 @@ class App extends BaseConfig
* Index File
* --------------------------------------------------------------------------
*
- * Typically this will be your index.php file, unless you've renamed it to
- * something else. If you are using mod_rewrite to remove the page set this
- * variable so that it is blank.
+ * Typically, this will be your `index.php` file, unless you've renamed it to
+ * something else. If you have configured your web server to remove this file
+ * from your site URIs, set this variable to an empty string.
*/
public string $indexPage = '';
@@ -84,17 +84,41 @@ class App extends BaseConfig
* --------------------------------------------------------------------------
*
* This item determines which server global should be used to retrieve the
- * URI string. The default setting of 'REQUEST_URI' works for most servers.
+ * URI string. The default setting of 'REQUEST_URI' works for most servers.
* If your links do not seem to work, try one of the other delicious flavors:
*
- * 'REQUEST_URI' Uses $_SERVER['REQUEST_URI']
- * 'QUERY_STRING' Uses $_SERVER['QUERY_STRING']
- * 'PATH_INFO' Uses $_SERVER['PATH_INFO']
+ * 'REQUEST_URI': Uses $_SERVER['REQUEST_URI']
+ * 'QUERY_STRING': Uses $_SERVER['QUERY_STRING']
+ * 'PATH_INFO': Uses $_SERVER['PATH_INFO']
*
* WARNING: If you set this to 'PATH_INFO', URIs will always be URL-decoded!
*/
public string $uriProtocol = 'REQUEST_URI';
+ /*
+ |--------------------------------------------------------------------------
+ | Allowed URL Characters
+ |--------------------------------------------------------------------------
+ |
+ | This lets you specify which characters are permitted within your URLs.
+ | When someone tries to submit a URL with disallowed characters they will
+ | get a warning message.
+ |
+ | As a security measure you are STRONGLY encouraged to restrict URLs to
+ | as few characters as possible.
+ |
+ | By default, only these are allowed: `a-z 0-9~%.:_-`
+ |
+ | Set an empty string to allow all characters -- but only if you are insane.
+ |
+ | The configured value is actually a regular expression character group
+ | and it will be used as: '/\A[]+\z/iu'
+ |
+ | DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
+ |
+ */
+ public string $permittedURIChars = 'a-z 0-9~%.:_\-';
+
/**
* --------------------------------------------------------------------------
* Default Locale
@@ -130,7 +154,7 @@ class App extends BaseConfig
*
* IncomingRequest::setLocale() also uses this list.
*
- * @var string[]
+ * @var list
*/
public array $supportedLocales = [
'ar-EG',
@@ -184,7 +208,8 @@ class App extends BaseConfig
* The default timezone that will be used in your application to display
* dates with the date helper, and can be retrieved through app_timezone()
*
- * @see https://www.php.net/manual/en/timezones.php for list of timezones supported by PHP.
+ * @see https://www.php.net/manual/en/timezones.php for list of timezones
+ * supported by PHP.
*/
public string $appTimezone = 'UTC';
@@ -208,7 +233,7 @@ class App extends BaseConfig
* If true, this will force every request made to this application to be
* made via a secure connection (HTTPS). If the incoming request is not
* secure, the user will be redirected to a secure version of the page
- * and the HTTP Strict Transport Security header will be set.
+ * and the HTTP Strict Transport Security (HSTS) header will be set.
*/
public bool $forceGlobalSecureRequests = false;
diff --git a/app/Config/Cache.php b/app/Config/Cache.php
index 751a8934c..dec950ed4 100644
--- a/app/Config/Cache.php
+++ b/app/Config/Cache.php
@@ -61,7 +61,7 @@ class Cache extends BaseConfig
* ['q'] = Enabled, but only take into account the specified list
* of query parameters.
*
- * @var bool|string[]
+ * @var bool|list
*/
public $cacheQueryString = false;
diff --git a/app/Config/ContentSecurityPolicy.php b/app/Config/ContentSecurityPolicy.php
index 7799c476f..2ac41a70d 100644
--- a/app/Config/ContentSecurityPolicy.php
+++ b/app/Config/ContentSecurityPolicy.php
@@ -45,28 +45,28 @@ class ContentSecurityPolicy extends BaseConfig
/**
* Will default to self if not overridden
*
- * @var string|string[]|null
+ * @var list|string|null
*/
public $defaultSrc;
/**
* Lists allowed scripts' URLs.
*
- * @var string|string[]
+ * @var list|string
*/
public $scriptSrc = 'self';
/**
* Lists allowed stylesheets' URLs.
*
- * @var string|string[]
+ * @var list|string
*/
public $styleSrc = 'self';
/**
* Defines the origins from which images can be loaded.
*
- * @var string|string[]
+ * @var list|string
*/
public $imageSrc = 'self';
@@ -75,14 +75,14 @@ class ContentSecurityPolicy extends BaseConfig
*
* Will default to self if not overridden
*
- * @var string|string[]|null
+ * @var list|string|null
*/
public $baseURI;
/**
* Lists the URLs for workers and embedded frame contents
*
- * @var string|string[]
+ * @var list|string
*/
public $childSrc = 'self';
@@ -90,21 +90,21 @@ class ContentSecurityPolicy extends BaseConfig
* Limits the origins that you can connect to (via XHR,
* WebSockets, and EventSource).
*
- * @var string|string[]
+ * @var list|string
*/
public $connectSrc = 'self';
/**
* Specifies the origins that can serve web fonts.
*
- * @var string|string[]
+ * @var list|string
*/
public $fontSrc;
/**
* Lists valid endpoints for submission from `