Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No restriction on AssetPipelineLoader and FileSystemLoader paths #217

Open
dreamsInDigital opened this issue Feb 7, 2018 · 0 comments
Open

Comments

@dreamsInDigital
Copy link

Currently there are directory traversal issues in the AssetPipelineLoader and FileSystemLoader. Premailer-rails will attempt to inline CSS from any local file. This will only inline portions that are close enough to CSS to be returned, but these strategies likely don't need to load files outside of predetermined paths.
Ex.

<link rel="stylesheet" type="text/css" href="/assets/../../../../../../../../../../etc/passwd">

It seems that the AssetPipelineLoader could be restricted to valid asset paths for the application, and the FileSystemLoader could be restricted to paths under /public.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant