Skip to content

Commit

Permalink
Merge pull request #2803 from samsonasik/fix-run-spark-on-mbstring-no…
Browse files Browse the repository at this point in the history
…t-installed

add ext-mbstring to required and update regex that sanitize file name
  • Loading branch information
lonnieezell authored Apr 6, 2020
2 parents e838ee0 + 07d583f commit 8c96a27
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 18 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@

## What is CodeIgniter?

CodeIgniter is a PHP full-stack web framework that is light, fast, flexible, and secure.
CodeIgniter is a PHP full-stack web framework that is light, fast, flexible, and secure.
More information can be found at the [official site](http://codeigniter.com).

This repository holds the source code for CodeIgniter 4 only.
Version 4 is a complete rewrite to bring the quality and the code into a more modern version,
while still keeping as many of the things intact that has made people love the framework over the years.
This repository holds the source code for CodeIgniter 4 only.
Version 4 is a complete rewrite to bring the quality and the code into a more modern version,
while still keeping as many of the things intact that has made people love the framework over the years.

More information about the plans for version 4 can be found in [the announcement](http://forum.codeigniter.com/thread-62615.html) on the forums.

### Documentation

The [User Guide](https://codeigniter4.github.io/userguide/) is the primary documentation for CodeIgniter 4.
The [User Guide](https://codeigniter4.github.io/userguide/) is the primary documentation for CodeIgniter 4.

The current **in-progress** User Guide can be found [here](https://codeigniter4.github.io/CodeIgniter4/).
The current **in-progress** User Guide can be found [here](https://codeigniter4.github.io/CodeIgniter4/).
As with the rest of the framework, it is a work in progress, and will see changes over time to structure, explanations, etc.

You might also be interested in the [API documentation](https://codeigniter4.github.io/api/) for the framework components.
Expand All @@ -43,9 +43,9 @@ The user guide updating and deployment is a bit awkward at the moment, but we ar

## Repository Management

CodeIgniter is developed completely on a volunteer basis. As such, please give up to 7 days
for your issues to be reviewed. If you haven't heard from one of the team in that time period,
feel free to leave a comment on the issue so that it gets brought back to our attention.
CodeIgniter is developed completely on a volunteer basis. As such, please give up to 7 days
for your issues to be reviewed. If you haven't heard from one of the team in that time period,
feel free to leave a comment on the issue so that it gets brought back to our attention.

We use Github issues to track **BUGS** and to track approved **DEVELOPMENT** work packages.
We use our [forum](http://forum.codeigniter.com) to provide SUPPORT and to discuss
Expand All @@ -56,7 +56,7 @@ be closed! If you are not sure if you have found a bug, raise a thread on the fo
someone else may have encountered the same thing.

Before raising a new Github issue, please check that your bug hasn't already
been reported or fixed.
been reported or fixed.

We use pull requests (PRs) for CONTRIBUTIONS to the repository.
We are looking for contributions that address one of the reported bugs or
Expand All @@ -72,8 +72,8 @@ to optional packages, with their own repository.

We **are** accepting contributions from the community!

We will try to manage the process somewhat, by adding a ["help wanted" label](https://github.com/codeigniter4/CodeIgniter4/labels/help%20wanted) to those that we are
specifically interested in at any point in time. Join the discussion for those issues and let us know
We will try to manage the process somewhat, by adding a ["help wanted" label](https://github.com/codeigniter4/CodeIgniter4/labels/help%20wanted) to those that we are
specifically interested in at any point in time. Join the discussion for those issues and let us know
if you want to take the lead on one of them.

At this time, we are not looking for out-of-scope contributions, only those that would be considered part of our controlled evolution!
Expand All @@ -82,17 +82,17 @@ Please read the [*Contributing to CodeIgniter*](https://github.com/codeigniter4/

## Server Requirements

PHP version 7.2 or higher is required, with the following extensions installed:
PHP version 7.2 or higher is required, with the following extensions installed:


- [intl](http://php.net/manual/en/intl.requirements.php)
- [libcurl](http://php.net/manual/en/curl.requirements.php) if you plan to use the HTTP\CURLRequest library
- [mbstring](http://php.net/manual/en/mbstring.installation.php)

Additionally, make sure that the following extensions are enabled in your PHP:

- json (enabled by default - don't turn it off)
- xml (enabled by default - don't turn it off)
- [mbstring](http://php.net/manual/en/mbstring.installation.php)
- [mysqlnd](http://php.net/manual/en/mysqlnd.install.php)

## Running CodeIgniter Tests
Expand Down
1 change: 1 addition & 0 deletions admin/framework/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"ext-curl": "*",
"ext-intl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"kint-php/kint": "^3.3",
"psr/log": "^1.1",
"laminas/laminas-escaper": "^2.6"
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"ext-curl": "*",
"ext-intl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"kint-php/kint": "^3.3",
"psr/log": "^1.1",
"laminas/laminas-escaper": "^2.6"
Expand Down
2 changes: 1 addition & 1 deletion system/Autoloader/Autoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ public function sanitizeFilename(string $filename): string
// be a path.
// http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_278
// Modified to allow backslash and colons for on Windows machines.
$filename = preg_replace('/[^a-zA-Z0-9\s\/\-\_\.\:\\\\]/', '', $filename);
$filename = preg_replace('/[^0-9\p{L}\s\/\-\_\.\:\\\\]/u', '', $filename);

// Clean up our filename edges.
$filename = trim($filename, '.-_');
Expand Down
10 changes: 10 additions & 0 deletions tests/system/Autoloader/AutoloaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,16 @@ public function testSanitizationSimply()

//--------------------------------------------------------------------

public function testSanitizationAllowUnicodeChars()
{
$test = 'Ä/path/to/some/file.php_';
$expected = 'Ä/path/to/some/file.php';

$this->assertEquals($expected, $this->loader->sanitizeFilename($test));
}

//--------------------------------------------------------------------

public function testSanitizationAllowsWindowsFilepaths()
{
$test = 'C:\path\to\some/file.php';
Expand Down
6 changes: 3 additions & 3 deletions user_guide_src/source/intro/requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
Server Requirements
###################

`PHP <https://www.php.net/>`_ version 7.2 or newer is required, with the
`*intl* extension <https://www.php.net/manual/en/intl.requirements.php>`_
`PHP <https://www.php.net/>`_ version 7.2 or newer is required, with the
`*intl* extension <https://www.php.net/manual/en/intl.requirements.php>`_ and `*mbstring* extension <https://www.php.net/manual/en/mbstring.requirements.php>`_
installed.

The following PHP extensions should be enabled on your server:
``php-json``, ``php-mbstring``, ``php-mysqlnd``, ``php-xml``
``php-json``, ``php-mysqlnd``, ``php-xml``

In order to use the :doc:`CURLRequest </libraries/curlrequest>`, you will need
`libcurl <https://www.php.net/manual/en/curl.requirements.php>`_ installed.
Expand Down

0 comments on commit 8c96a27

Please sign in to comment.