Upload error with .dotx attachments

Stacey9
Mega Guru

We have a list of approved file extensions for attachments in ServiceNow System Properties > Security, with MIME checked of as true and the same list in the glide.attachment.extensions. We are having issues where anyone trying to attach a .dotx file receives the error "attachment refused because file type not allowed or type does not match file contents". If I turn MIME type checking off we can upload .dotx, but if it's on we get that error. I'm not able to get away with turning this off as it's there for security hardening reasons. Is there something we can do to fix this? We are currently on Rome and will be upgrading to Tokyo when it gets released later in the year.

1 ACCEPTED SOLUTION

Stacey9
Mega Guru

I received a solution from ServiceNow. Tested and this works. Hopefully this helps anyone else in the same situation.

Most Probable Cause:
This is due to the Tika Library which restricts due to security.
When the dotx file is uploaded, the mime type is application/vnd.ms-word.document.macroenabled.12 which Tika Library restricts due to the security reasons.

Solution Proposed:
Navigate to sys_properties.list and create or edit property with name 'glide.security.mime_type.aliasset' and append to the value <expected mime type>=<actual mime type>

In your case, please append the below value to the property 'glide.security.mime_type.aliasset' (a screenshot attached: mime_aliasset_property.png).

application/vnd.openxmlformats-officedocument.wordprocessingml.template=application/vnd.ms-word.document.macroenabled.12

View solution in original post

4 REPLIES 4

Abhay Kumar1
Giga Sage
Hi Stacey, if i understood you query correctly you are getting error even after allowing filetype 'dotx'. If so, you can try to clear cookies and cache, and then relogin onto instance. Hope this will help

Unfortunately that doesn't work either. The only way I can get the dotx to upload without error is to turn off the MIME type checking.

Hitoshi Ozawa
Giga Sage
Giga Sage

Hi Stacey,

There's a Now Support page concerning file upload.

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0718011

Tested in my instance and it seems like zipping the file is the only available alternative.

the .zip extension is often included in the allowable file extensions. Thus, compressing the file (which will result in a file with a .zip file extension) and then attaching the compressed file should allow the file to be attached as needed.

Stacey9
Mega Guru

I received a solution from ServiceNow. Tested and this works. Hopefully this helps anyone else in the same situation.

Most Probable Cause:
This is due to the Tika Library which restricts due to security.
When the dotx file is uploaded, the mime type is application/vnd.ms-word.document.macroenabled.12 which Tika Library restricts due to the security reasons.

Solution Proposed:
Navigate to sys_properties.list and create or edit property with name 'glide.security.mime_type.aliasset' and append to the value <expected mime type>=<actual mime type>

In your case, please append the below value to the property 'glide.security.mime_type.aliasset' (a screenshot attached: mime_aliasset_property.png).

application/vnd.openxmlformats-officedocument.wordprocessingml.template=application/vnd.ms-word.document.macroenabled.12