File tree Expand file tree Collapse file tree 6 files changed +6
-5
lines changed
Expand file tree Collapse file tree 6 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,8 @@ function exceptionHandler($exception) {
5454 // set to run indefinitely if needed
5555 \set_time_limit (0 );
5656
57+ stream_wrapper_unregister ('phar ' ); // disable phar wrapper
58+
5759 if (!OC ::$ CLI ) {
5860 echo "This script can be run from the command line only " . PHP_EOL ;
5961 exit (1 );
Original file line number Diff line number Diff line change 3333
3434require_once __DIR__ . '/lib/base.php ' ;
3535
36+ stream_wrapper_unregister ('phar ' ); // disable phar wrapper
3637if (!\OC ::$ CLI ) {
3738 $ url = \OC ::$ server ->getURLGenerator ()->linkToRoute ('core.Cron.run ' );
3839 \header ("Location: $ url " );
Original file line number Diff line number Diff line change 2929
3030try {
3131 require_once __DIR__ . '/lib/base.php ' ;
32+ stream_wrapper_unregister ('phar ' ); // disable phar wrapper
3233 OC ::handleRequest ();
3334} catch (\OC \ServiceUnavailableException $ ex ) {
3435 \OC ::$ server ->getLogger ()->logException ($ ex , ['app ' => 'index ' ]);
Original file line number Diff line number Diff line change @@ -569,11 +569,6 @@ public static function init() {
569569 @\ini_set ('post_max_size ' , '10G ' );
570570 @\ini_set ('file_uploads ' , '50 ' );
571571
572- // disable phar handler in web requests
573- if (!self ::$ CLI ) {
574- stream_wrapper_unregister ("phar " );
575- }
576-
577572 self ::setRequiredIniValues ();
578573 self ::handleAuthHeaders ();
579574 self ::registerAutoloaderCache ();
Original file line number Diff line number Diff line change 2828 */
2929try {
3030 require_once __DIR__ . '/lib/base.php ' ;
31+ stream_wrapper_unregister ('phar ' ); // disable phar wrapper
3132 if (\OCP \Util::needUpgrade ()) {
3233 // since the behavior of apps or remotes are unpredictable during
3334 // an upgrade, return a 503 directly
Original file line number Diff line number Diff line change @@ -116,6 +116,7 @@ function resolveService($service) {
116116try {
117117 require_once __DIR__ . '/lib/base.php ' ;
118118
119+ stream_wrapper_unregister ('phar ' ); // disable phar wrapper
119120 // All resources served via the DAV endpoint should have the strictest possible
120121 // policy. Exempted from this is the SabreDAV browser plugin which overwrites
121122 // this policy with a softer one if debug mode is enabled.
You can’t perform that action at this time.
0 commit comments