Skip to content

Commit

Permalink
Fixing AssetService - after Falk broke it.
Browse files Browse the repository at this point in the history
  • Loading branch information
FalkWolsky committed Mar 24, 2024
1 parent 3476223 commit eeef89a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public Mono<Asset> upload(Part filePart, int maxFileSizeKB, boolean isThumbnail)

// The reason we restrict file types here is to avoid having to deal with dangerous image types such as SVG,
// which can have arbitrary HTML/JS inside of them.
final MediaType contentType = filePart.headers().getContentType();
if (contentType == null || !ALLOWED_CONTENT_TYPES.contains(contentType)) {
return Mono.error(new BizException(BizError.INVALID_PARAMETER, "INCORRECT_IMAGE_TYPE"));
}
Expand Down

0 comments on commit eeef89a

Please sign in to comment.