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

Fuzzing #84

Merged
merged 7 commits into from Apr 6, 2020

handle missing right parent on +js(

  • Loading branch information
antonok-edm committed Mar 30, 2020
commit 780331fe6a729a2f48805cc7aad2274f8cb91b2b
@@ -213,7 +213,7 @@ impl CosmeticFilter {
return Err(CosmeticFilterError::EmptyRule);
}
let mut style = None;
if line.len() - suffix_start_index > 4 && line[suffix_start_index..].starts_with("+js(") {
if line.len() - suffix_start_index > 4 && line[suffix_start_index..].starts_with("+js(") && line.ends_with(")") {
if sharp_index == 0 {
return Err(CosmeticFilterError::GenericScriptInject);
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.