electron / asar

Simple extensive tar-like archive format with indexing
MIT License
2.55k stars 248 forks source link

Incorrect integrity of transformed files? #277

Open toyobayashi opened 1 year ago

toyobayashi commented 1 year ago

https://github.com/electron/asar/blob/c2b4777a4089d19b12327888577e2ffec1cc1dae/lib/filesystem.js#L70-L94

https://github.com/electron/asar/blob/c2b4777a4089d19b12327888577e2ffec1cc1dae/lib/filesystem.js#L94

p is original file path, while transformed file path is

https://github.com/electron/asar/blob/c2b4777a4089d19b12327888577e2ffec1cc1dae/lib/filesystem.js#L73

erikian commented 11 months ago

I'm not sure if I understand the problem, could you elaborate?

toyobayashi commented 11 months ago

@erikian Sorry for unclear context. I mean, code above shows that the integrity is computed for original file, not for transformed file. If transform options is provided, should it compute transformed file integrity to the node.integrity? Am I right?