mirror of
https://github.com/corda/corda.git
synced 2025-06-01 07:00:54 +00:00
Minor: don't check the file name in an upload if there isn't one
This commit is contained in:
parent
29e58ce3db
commit
6ac05c2edb
@ -45,7 +45,7 @@ class DataUploadServlet : HttpServlet() {
|
|||||||
val messages = ArrayList<String>()
|
val messages = ArrayList<String>()
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
val item = iterator.next()
|
val item = iterator.next()
|
||||||
if (!acceptor.acceptableFileExtensions.any { item.name.endsWith(it) }) {
|
if (item.name != null && !acceptor.acceptableFileExtensions.any { item.name.endsWith(it) }) {
|
||||||
resp.sendError(HttpServletResponse.SC_BAD_REQUEST,
|
resp.sendError(HttpServletResponse.SC_BAD_REQUEST,
|
||||||
"${item.name}: Must be have a filename ending in one of: ${acceptor.acceptableFileExtensions}")
|
"${item.name}: Must be have a filename ending in one of: ${acceptor.acceptableFileExtensions}")
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user