Accept SVG content type with charset
All checks were successful
build-and-deploy / build-deploy (push) Successful in 35s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 35s
This commit is contained in:
@@ -174,7 +174,7 @@ class Guests(
|
||||
throw ResponseStatusException(HttpStatus.BAD_REQUEST, "File is empty")
|
||||
}
|
||||
val contentType = file.contentType ?: ""
|
||||
if (!contentType.equals("image/svg+xml", ignoreCase = true)) {
|
||||
if (!contentType.lowercase().startsWith("image/svg+xml")) {
|
||||
throw ResponseStatusException(HttpStatus.BAD_REQUEST, "Only SVG allowed")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user