Skip to content

Commit

Permalink
Fix #4 by adding boundary=cats for multipart headers
Browse files Browse the repository at this point in the history
  • Loading branch information
en-milie committed Nov 26, 2020
1 parent 174c028 commit 899e80b
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ public abstract class BaseSecurityChecksHeadersFuzzer implements Fuzzer {
"image/x-icon",
"image/vnd.djvu",
"image/svg+xml",
"multipart/mixed",
"multipart/alternative",
"multipart/related",
"multipart/form-data",
"multipart/mixed; boundary=cats",
"multipart/alternative; boundary=cats",
"multipart/related; boundary=cats",
"multipart/form-data; boundary=cats",
"text/css",
"text/csv",
"text/html",
Expand All @@ -63,7 +63,7 @@ protected static List<Set<CatsHeader>> filterHeaders(FuzzingData data, String he
List<Set<CatsHeader>> setOfSets = new ArrayList<>();

for (String currentHeader : UNSUPPORTED_MEDIA_TYPES) {
if (!contentTypes.contains(currentHeader)) {
if (contentTypes.stream().noneMatch(currentHeader::startsWith)) {
Set<CatsHeader> clonedHeaders = Cloner.cloneMe(data.getHeaders());
clonedHeaders.add(CatsHeader.builder().name(headerName).value(currentHeader).build());
setOfSets.add(clonedHeaders);
Expand Down

0 comments on commit 899e80b

Please sign in to comment.