Last active
May 4, 2021 14:03
-
-
Save jolor1/1d468cacb3f8c8c45e795528d606c359 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void fuzzerTestOneInput(FuzzedDataProvider data) { | |
String input = data.consumeRemainingAsString(); | |
String safeJson; | |
try { | |
safeJson = JsonSanitizer.sanitize(input, 10); | |
} catch (Exeption e) { | |
return; | |
} | |
assert !safeJson.contains("</script") | |
: new FuzzerSecurityIssueHigh("Output contains </script"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment