Skip to content

Commit

Permalink
Fixed a potential RCE vulnerability
Browse files Browse the repository at this point in the history
  • Loading branch information
angrybrad committed Jun 27, 2023
1 parent a2ece09 commit 0bd3386
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes for Craft CMS 3.x

## Unreleased

- Fixed an RCE vulnerability.

## 3.8.14 - 2023-06-13

- The `_includes/forms/date` and `_includes/forms/time` templates now accept a `timeZone` variable.
Expand Down
3 changes: 3 additions & 0 deletions src/helpers/FileHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ class FileHelper extends \yii\helpers\FileHelper
*/
public static function normalizePath($path, $ds = DIRECTORY_SEPARATOR)
{
// Remove any file protocol wrappers
$path = StringHelper::removeLeft($path, 'file://');

// Is this a UNC network share path?
$isUnc = (strpos($path, '//') === 0 || strpos($path, '\\\\') === 0);

Expand Down

0 comments on commit 0bd3386

Please sign in to comment.