Fix to an issue that prevented attachments being uploaded with invalid category choices when the malware checkbox was ticked

- re-introduced the removed check for valid category / type combinations based on the checkbox and the chosen category
Merge branch 'hotfix-2.1.30'