JsObjExporter icon indicating copy to clipboard operation
JsObjExporter copied to clipboard

Security Alert on xls file opening

Open xavhan opened this issue 5 years ago • 5 comments

Describe the bug

Security alert on xls opening

To Reproduce Steps to reproduce the behavior:

  1. Generate an xsl file.
  2. Open it with Excel (Max OS Excel for Mac 16.21.1)
  3. You got the screenshotted alert message

Expected behavior No error message

Screenshots

capture d ecran 2019-01-30 a 14 22 43

xavhan avatar Jan 30 '19 13:01 xavhan

Sorry for the french, it means

"Format and extension of the file ... do not match. The file can be of risk or have been dammaged. Do not open it, unlessyou trust the source. Do you stillwant to open it?"

xavhan avatar Jan 30 '19 13:01 xavhan

hi there! thanks for using this library. Pas de soucis je parle un peu français 😄

MS Excel recognizes 2 different formats natively: (1) binary and (2) the zipped up XML. Also various extensions and MIME types are assigned to these formats. What In this library I am simulating the binary format.

I guess the issue here is that I'm using base64 for the binary conversion whereas uint8array should be used.

I will check this out asap and will get back to you,

gharibi avatar Jan 30 '19 20:01 gharibi

Hello !

First, thank you for your library, it rocks!

Do you have any update @gharibi?

matthieurobin avatar Aug 21 '20 09:08 matthieurobin

HI there. Thanks for using this library. Unfortunately due to huge workload I couldn't work on this. Considering the solution which I have written, feel free to take a look at this issue if you have time.

gharibi avatar Aug 21 '20 18:08 gharibi

Can you provide a usecase or example on jsfiddle to test this and I may be able to look at https://github.com/gharibi/JsObjExporter/blob/master/src/js/xls.js#L17 and see if base64 can be replaced with unit8array to solve the mismatch on format. Will create a PR if it does and might be good to have that as an option on xls to provide format you want.

mfsbo avatar Apr 03 '22 23:04 mfsbo