Skip to content
Permalink
Browse files Browse the repository at this point in the history
Disallow SVGs
  • Loading branch information
Andrew Welch committed Sep 24, 2021
1 parent 8c0dc48 commit 4e46b79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controllers/FileController.php
Expand Up @@ -96,7 +96,7 @@ public function actionSeoFileLink($url, $robots = '', $canonical = '', $inline =
if (($ext = pathinfo($fileName, PATHINFO_EXTENSION)) !== '') {
$ext = strtolower($ext);
}
if ($ext === '' || !in_array($ext, $allowedExtensions, true)) {
if ($ext === '' || $ext === 'svg' || !in_array($ext, $allowedExtensions, true)) {
throw new ServerErrorHttpException(Craft::t('seomatic', 'File format not allowed.'));
}
// Send the file as a stream, so it can exist anywhere
Expand Down

0 comments on commit 4e46b79

Please sign in to comment.