SECURITY: API: Improve validation in chunked uploading