File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 172172 Added support for the Unix timestamp extension for Zip-based archives.
173173 </entry >
174174 </row >
175+ <row >
176+ <entry >8.0.0</entry >
177+ <entry >
178+ Meta-data is no longer deserialized upon opening the archive,
179+ but is deferred until <methodname >Phar::getMetadata</methodname >
180+ is called.
181+ </entry >
182+ </row >
175183 </tbody >
176184 </tgroup >
177185 </informaltable >
178186 </section >
187+
188+ <section role =" notes" >
189+ &reftitle.notes;
190+ <caution >
191+ <simpara >
192+ Prior to PHP 8.0.0, the meta-data was deserialized upon opening the
193+ archive. This could lead to security vulnerabilities.
194+ Starting with PHP 8.0.0, meta-data is only deserialized when calling
195+ <methodname >Phar::getMetadata</methodname >, which has options to restrict
196+ deserialization for security reasons.
197+ </simpara >
198+ </caution >
199+ </section >
179200 </partintro >
180201
181202 &reference.phar.entities.Phar;
Original file line number Diff line number Diff line change 1616 Retrieve archive meta-data. Meta-data can be any PHP variable that can be serialized.
1717 </para >
1818
19+ <caution >
20+ <simpara >
21+ Accessing the meta-data will trigger deserialization, which can trigger
22+ the execution of arbitrary PHP code. Do not use this on untrusted phar
23+ archives, or configure the <parameter >unserializeOptions</parameter >
24+ in a secure manner.
25+ </simpara >
26+ </caution >
27+
1928 </refsect1 >
2029 <refsect1 role =" parameters" >
2130 &reftitle.parameters;
You can’t perform that action at this time.
0 commit comments