Fix #16658: Fix file readability check on publishing assets by yii\web\AssetManager

This commit is contained in:
Artem Manchenkov
2022-08-29 09:18:59 +02:00
committed by GitHub
parent 391a741a63
commit d6dfca1b80
2 changed files with 5 additions and 0 deletions

View File

@ -4,6 +4,7 @@ Yii Framework 2 Change Log
2.0.47 under development
------------------------
- Bug #16658: Fix file readability check on publishing assets by `yii\web\AssetManager` (manchenkoff)
- Bug #15557: Fix empty fields exclusion in safe attributes of `yii\base\Model` (manchenkoff)
- Bug #19508: Fix wrong selection for boolean attributes in GridView (alnidok)
- Bug #19517: Fix regression in `CompositeAuth::authenticate()` introduced in #19418 (WinterSilence)

View File

@ -476,6 +476,10 @@ class AssetManager extends Component
throw new InvalidArgumentException("The file or directory to be published does not exist: $path");
}
if (!is_readable($path)) {
throw new InvalidArgumentException("The file or directory to be published is not readable: $path");
}
if (is_file($src)) {
return $this->_published[$path] = $this->publishFile($src);
}