Skip to content

Commit

Permalink
Merge pull request #5793 from kenjis/fix-Config/Publisher
Browse files Browse the repository at this point in the history
fix: Publisher $restrictions regex to FCPATH
  • Loading branch information
kenjis authored Mar 13, 2022
2 parents 6198639 + 81f062f commit feb6bf0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/Config/Publisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ class Publisher extends BasePublisher
*/
public $restrictions = [
ROOTPATH => '*',
FCPATH => '#\.(?css|js|map|htm?|xml|json|webmanifest|tff|eot|woff?|gif|jpe?g|tiff?|png|webp|bmp|ico|svg)$#i',
FCPATH => '#\.(s?css|js|map|html?|xml|json|webmanifest|tff|eot|woff2?|gif|jpe?g|tiff?|png|webp|bmp|ico|svg)$#i',
];
}
12 changes: 6 additions & 6 deletions tests/system/Publisher/PublisherRestrictionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
final class PublisherRestrictionsTest extends CIUnitTestCase
{
/**
* @see Tests\Support\Config\Registrars::Publisher()
* @see \Tests\Support\Config\Registrar::Publisher()
*/
public function testRegistrarsNotAllowed()
{
Expand Down Expand Up @@ -69,11 +69,11 @@ public function testDefaultPublicRestrictions(string $path)

public function fileProvider()
{
yield 'php' => ['index.php'];

yield 'exe' => ['cat.exe'];

yield 'flat' => ['banana'];
yield from [
'php' => ['index.php'],
'exe' => ['cat.exe'],
'flat' => ['banana'],
];
}

/**
Expand Down

0 comments on commit feb6bf0

Please sign in to comment.