Cadet 3rd Class
Cadet 3rd Class
1361 views

Incorrect file type causing HTTP 403 error

Jump to solution

When my company's software tries to upload a file that has the wrong extension (in this case, a PNG file with a .jpg extension), Octane gives an HTTP 403 Forbidden error in response. Can someone confirm that this is the correct behaviour, and if so, is there any way to override it and upload the file anyway?

0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert

Indeed this is the correct behavior, this is part of the security features of the product.

If you want to allow this specific operation (of uploading a png with a jpg extension) you need to update EXTENSION_TO_MIME_TYPE site parameter by adding to it 

jpg=image/png

see details at https://admhelp.microfocus.com/octane/en/latest/Online/Content/AdminGuide/params.htm

View solution in original post

3 Replies
Micro Focus Expert
Micro Focus Expert

Indeed this is the correct behavior, this is part of the security features of the product.

If you want to allow this specific operation (of uploading a png with a jpg extension) you need to update EXTENSION_TO_MIME_TYPE site parameter by adding to it 

jpg=image/png

see details at https://admhelp.microfocus.com/octane/en/latest/Online/Content/AdminGuide/params.htm

View solution in original post

Cadet 3rd Class
Cadet 3rd Class

That worked! Thank you very much.

0 Likes
Micro Focus Expert
Micro Focus Expert

Hi,

Yes, this thread is a bit older - but perhaps someone might find it useful 😉

The very latest Octane release 12.60.41 (SaaS) has a new parameter VALIDATE_MIME_TYPE_MATCH_TO_EXTENSION which you could use to disable validation. Should be available in the next on premise release as well.

Regards,

Dirk

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.