-
Notifications
You must be signed in to change notification settings - Fork 6
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
Unicode values in require causing LibSass segaults #11
Comments
A simple fix that worked locally is -data: `$_: ___((${jsValue}));`,
+data: `$_: ___(("${jsValue}"));`, However I'm not familiar enough with Sassport to know what kind of unintended side effects that may have. |
Hmm interesting - the reason that it is unquoted (and instead surrounded by parentheses) is because {
"foo-height": "34px"
} then Actually, I may have a better fix: @function ___($val) {
@return $val;
}
$_: ___((Classes and IDs must follow a specific grammar\. And this thing here doesn\'t\.));
.foo {
test: $_;
} This will work. I just have to escape periods and quotes. Is there anything else I should escape that you can think of? |
I couldn't say off the top of my head. I'm actually surprised that works :) |
This might help you track down the correct escaping - https://github.com/minimaxir/big-list-of-naughty-strings |
Bug for abort filed upstream sass/libsass#2016 |
@hugogiraudel ran into this issue and engaged my help in debugging.
evil.json
test.scss
test.js
Result
Firstly let me state that the abort is a bug in LibSass. However it occurs due to a bug in Sassport.
The custom function in
utils.infer
does not quote thejsValue
when it's a String.The resulting
data
passed to Node Sass ends up beingThe missing
"
around the function argument cause a (Ruby) Sass error.This error is not handled by LibSass so instead the abort happens
The text was updated successfully, but these errors were encountered: