-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Description
Hi,
I'm using AssetManager with a collection resolver, but I think there is a security issue.
I have a situation like this
'resolver_configs' => array(
'collections' => array(
'css/style.css' => array(
'css/lessfile1.css',
'css/lessfile2.css',
),
),
'paths' => array(
__DIR__ . '/../public',
),
),
'filters' => array(
'css/style.css' => array(
array(
'filter' => 'Lessphp',
),
),
This works correctly. I can see /css/style.css correctly. The security problem is related to paths. To use a collection I need to configure a path that expose my single files.
I want to serve only files merged and compressed, because in single files there are a lot of team's comments.
An easy solution could be like this:
'resolver_configs' => array(
'collections' => array(
'css/style.css' => array(
__DIR__ . '/../public/css/lessfile1.css',
__DIR__ . '/../public/css/lessfile2.css',
),
),
),
'filters' => array(
'css/style.css' => array(
array(
'filter' => 'Lessphp',
),
),
But this doesn't work because I think that a collection expect an alias and not a path. Is there another solution?
Metadata
Metadata
Assignees
Labels
No labels