Skip to content

Commit d21957b

Browse files
committed
EZP-29552: Do not allow PHAR stream decoding
1 parent 4697bff commit d21957b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

autoload.php

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
* @package kernel
99
*/
1010

11+
// Disable the PHAR stream wrapper as it is insecure
12+
if (in_array('phar', stream_get_wrappers())) {
13+
stream_wrapper_unregister('phar');
14+
}
15+
1116
// config.php can set the components path like:
1217
// ini_set( 'include_path', ini_get( 'include_path' ). ':../ezcomponents/trunk' );
1318
// It is also possible to push a custom autoload method to the autoload

0 commit comments

Comments
 (0)