You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I've noticed an issue where certain files types – we're trying .docx, .xls, .xlsx – fail to upload when creating them via a save_*_Asset mutation.
The issue appears to be related to the regex here not validating when the type has periods.
I copied the regex and ran some tests:
application/thisworks validates correctly:
application/this.doesnt.work doesn't validate:
I'm not sure whether simply tweaking the regex will fix it, as I'm unsure how many file extensions FileHelper::getExtensionByMimeType handles.
Steps to reproduce
Try to create an asset via a save_*_Asset mutation, with a base64 encoded string that contains periods in the data section, e.g. data:application/vnd.ms-excel;base64,....
Additional info
Craft version: 3.5.17
PHP version: 7.3.23
Database driver & version: MySQL 5.5.5
Plugins & versions: -
The text was updated successfully, but these errors were encountered:
Description
Hey, I've noticed an issue where certain files types – we're trying
.docx, .xls, .xlsx
– fail to upload when creating them via asave_*_Asset
mutation.The issue appears to be related to the regex here not validating when the type has periods.
I copied the regex and ran some tests:
application/thisworks
validates correctly:application/this.doesnt.work
doesn't validate:I'm not sure whether simply tweaking the regex will fix it, as I'm unsure how many file extensions FileHelper::getExtensionByMimeType handles.
Steps to reproduce
save_*_Asset
mutation, with a base64 encoded string that contains periods in thedata
section, e.g.data:application/vnd.ms-excel;base64,...
.Additional info
The text was updated successfully, but these errors were encountered: