Skip to content

Commit

Permalink
Fix page extension validation
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoHood committed Jan 6, 2021
1 parent 2738107 commit 4131e9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Uri.php
Original file line number Diff line number Diff line change
Expand Up @@ -1353,7 +1353,7 @@ public function isValidExtension($extension)
$valid_page_types = implode('|', Utils::getSupportPageTypes());

// Strip the file extension for valid page types
if (preg_match('/(' . $valid_page_types . ')/', $extension)) {
if (preg_match('/^(' . $valid_page_types . ')$/', $extension)) {
return true;
}
return false;
Expand Down

0 comments on commit 4131e9c

Please sign in to comment.