Browse Source

Pull request #223194: BI-121538 fix(bi.file): 严格文件类型校验

Merge in DEC/fineui from ~XAVIER.MENG/dec-fineui:release/11.0 to release/11.0

* commit '352ab6acf0c09fb160fd1ab0bc1b34ee2e9d16a0':
  BI-121538 fix(bi.file): 严格文件类型校验
research/test
Xavier.Meng-孟宇翔 2 years ago
parent
commit
afcff1d683
  1. 4
      src/base/single/input/file.js

4
src/base/single/input/file.js

@ -437,11 +437,11 @@
var matches;
matches = mime.match(r1);
if (matches) {
return fileName.toLowerCase().indexOf(matches[1]) > -1;
return fileName.toLowerCase().endsWith(matches[0]);
}
matches = mime.match(r2);
if (matches) {
return matches[1] === "*" ? true : fileName.toLowerCase().indexOf(matches[1]) > -1;
return matches[1] === "*" ? true : fileName.toLowerCase().endsWith(`.${matches[1]}`);
}
});
}

Loading…
Cancel
Save