add Rhino primary contact (#9371)

This commit is contained in:
RBRi 2023-01-09 00:10:27 +01:00 committed by GitHub
parent b37a2d948d
commit 6211c9d86e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 13 deletions

View File

@ -32,9 +32,7 @@ public class HtmlParserFuzzer {
private FuzzedDataProvider fuzzedDataProvider;
public HtmlParserFuzzer(FuzzedDataProvider fuzzedDataProvider) {
this.fuzzedDataProvider = fuzzedDataProvider;
}
BrowserVersion getBrowserVersion() {
@ -42,33 +40,26 @@ public class HtmlParserFuzzer {
* from src/test/java/com/gargoylesoftware/htmlunit/WebTestCase.java
*/
return new BrowserVersion.BrowserVersionBuilder(BrowserVersion.BEST_SUPPORTED)
.setApplicationName("FLAG_ALL_BROWSERS")
.build();
.setApplicationName("FLAG_ALL_BROWSERS")
.build();
}
void test() {
try {
WebClient webClient = new WebClient(getBrowserVersion());
WebResponse webResponse = new StringWebResponse(fuzzedDataProvider.consumeRemainingAsString(), new URL("http://localhost.edu/index.html"));
HtmlPage page = new HtmlPage(webResponse, webClient.getCurrentWindow());
try (WebClient webClient = new WebClient(getBrowserVersion())) {
/*
* net.sourceforge.htmlunit.corejs.javascript.EvaluatorException
* seems to be fatal
*/
webClient.getOptions().setThrowExceptionOnScriptError(false);
webClient.getCurrentWindow().setEnclosedPage(page);
webClient.getPageCreator().getHtmlParser().parse(webResponse, page, false, false);
webClient.loadHtmlCodeIntoCurrentWindow(fuzzedDataProvider.consumeRemainingAsString());
} catch (IllegalArgumentException e) {
} catch (MalformedURLException e) {
} catch (IOException e) {
}
}
public static void fuzzerTestOneInput(FuzzedDataProvider fuzzedDataProvider) {
HtmlParserFuzzer testFixture = new HtmlParserFuzzer(fuzzedDataProvider);
testFixture.test();
}

View File

@ -1,6 +1,7 @@
homepage: "https://github.com/mozilla/rhino"
language: jvm
main_repo: "https://github.com/mozilla/rhino.git"
primary_contact: "ronaldbrill@googlemail.com"
fuzzing_engines:
- libfuzzer
sanitizers: