Skip to content

Commit

Permalink
Api: Do not include absolute URL sources to global asset file.
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek authored Apr 25, 2021
1 parent e8139a8 commit a06bbcb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ public function run(string $path): void
$topModTime = 0;
if ($data !== []) { // 3.
foreach ($data[$format] ?? [] as $file) {
if (preg_match('~^(?:https?:)//~', $file)) { // do not accept URL
continue;
}
$filePath = $this->basePath . '/' . trim($file, '/');
if (is_file($filePath) === true) {
$modificationTime = (int) filemtime($filePath);
Expand Down

0 comments on commit a06bbcb

Please sign in to comment.