/ingest/addTrack with incorrect parameters causes NullPointerException and 500 Internal Server Error

Steps to reproduce

curl -f --digest -u matterhorn_system_account:CHANGE_ME -H "X-Requested-Auth: Digest" "http://testallinone.usask.ca:8080/ingest/createMediaPackage" -o mp.xml

curl -f --digest -u matterhorn_system_account:CHANGE_ME -H "X-Requested-Auth: Digest" "http://testallinone.usask.ca:8080/ingest/addTrack" -F 'mediaPackage=<mp.xml'
curl: (22) The requested URL returned error: 500 Internal Server Error

2014-05-22 08:28:41 WARN (IngestRestService:412) -
java.lang.NullPointerException
at org.opencastproject.util.PathSupport.toSafeName(PathSupport.java:68)
at org.opencastproject.workingfilerepository.impl.WorkingFileRepositoryImpl.put(WorkingFileRepositoryImpl.java:272)
at org.opencastproject.ingest.impl.IngestServiceImpl.addContentToRepo(IngestServiceImpl.java:1183)
at org.opencastproject.ingest.impl.IngestServiceImpl.addTrack(IngestServiceImpl.java:574)
at org.opencastproject.ingest.endpoint.IngestRestService.addMediaPackageElement(IngestRestService.java:402)
at org.opencastproject.ingest.endpoint.IngestRestService.addMediaPackageTrack(IngestRestService.java:281)

It should

  • Reply with a 400 Bad Request

  • Reply a proper warning

  • Cause no exception

Status

Assignee

Lars Kiesow

Reporter

Lars Kiesow

Severity

Incorrectly Functioning With Workaround

Tags (folksonomy)

None

Components

Fix versions

Affects versions

1.5.0

Priority

Major
Configure