fixes security vulnerabilities for falsified headers
Fixes default_upload_permission to listen to the umask by default.