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
I stumbled across a situation in which the addon fails to detect the extension listed in warn list.
Namely, I received an email with the attachment file name in the following form "somefilename.pdf.xlsx". Per the settings, the file extension on which I should be getting warning covers XLSX, but not PDF. Here is a warn list from the settings: "DOC,DOCX,DOCM,PPT,PPTM,XLS,XLSM,XSLX,PPS,PPSM,HTML,HTM". The version I am running is 2.10.
I do not know how, but it looks like the code is missing to identify the extension due to the multiple dots in the file name formating. The code does look fine since it is addressing lastIndexOf.
let ext = attName.substring(attName.lastIndexOf(".")).toLowerCase();
Just an tought (altrough I do not work with JS), maybe using split instead of lastIndexOf or lastIndexOf(".")+1 could resolve the problem:
// get the current file extension
let attName = o.displayName ? o.displayName : o.name;
var extArray = attName.split(".").toLowerCase();
let ext = extArray.[extArray.length - 1];
The text was updated successfully, but these errors were encountered:
I stumbled across a situation in which the addon fails to detect the extension listed in warn list.
Namely, I received an email with the attachment file name in the following form "somefilename.pdf.xlsx". Per the settings, the file extension on which I should be getting warning covers XLSX, but not PDF. Here is a warn list from the settings: "DOC,DOCX,DOCM,PPT,PPTM,XLS,XLSM,XSLX,PPS,PPSM,HTML,HTM". The version I am running is 2.10.
I do not know how, but it looks like the code is missing to identify the extension due to the multiple dots in the file name formating. The code does look fine since it is addressing
lastIndexOf
.Just an tought (altrough I do not work with JS), maybe using
split
instead oflastIndexOf
orlastIndexOf(".")+1
could resolve the problem:The text was updated successfully, but these errors were encountered: