SheetJS / sheetjs

📗 SheetJS Spreadsheet Data Toolkit -- New home https://git.sheetjs.com/SheetJS/sheetjs
https://sheetjs.com/
Apache License 2.0
35.12k stars 8k forks source link

Code is not protected for incorrect user input #2567

Open gibito opened 4 years ago

gibito commented 4 years ago

HTR:

1)use this as format string: [red]-##,# 2) jj=ostr.length-1; will break with length of undefined

snoopyjc commented 4 years ago

I get an error message on this one:

console.log(SSF.format("[red]-##,#", 1))
error: Error: unsupported format |##,#|

If I put the comma in the proper place, then it works as expected:

console.log(SSF.format("[red]-#,###", 1))
-1