Commit Graph

3 Commits

Author SHA1 Message Date
MarkBaker dcc47fb287 Codestyle clean-ups 2020-10-09 16:08:20 +02:00
MarkBaker 87a909aaf8 Use ZipArchive methods as zip_* functions are deprecated in PHP8 2020-10-09 12:58:33 +02:00
oleibman 82ea1d5596
Fix for #1516 (#1530)
This problem is that ZipStream, in contrast to ZipArchive,
is saving 2 files with the same path. I have opened an issue with
ZipStream, who agree that this appears to be a bug.

For the case in question, PhpSpreadsheet is attempting to save
a file with the same path twice (and unexpectedly succeeding)
because of a clone operation. This fix attempts to rectify the problem
by keeping track of all the paths being saved in the zip file,
and not attempting to save any duplicate paths.

The problem case attempted to save printersettings1.bin twice,
but there are other possible exposures, e.g. by cloning a sheet
with a drawing.The new test cases clone an existing sample which
has both printer settings and drawings.
2020-06-19 20:26:02 +02:00