Merge "Remove unused $resourceLoader"
[lhc/web/wiklou.git] / includes / OutputPage.php
index 403ac60..922960f 100644 (file)
@@ -3702,8 +3702,9 @@ class OutputPage extends ContextSource {
                } else {
                        $remotePath = $remotePathPrefix;
                }
-               if ( strpos( $path, $remotePath ) !== 0 ) {
-                       // Path is outside wgResourceBasePath, ignore.
+               if ( strpos( $path, $remotePath ) !== 0 || substr( $path, 0, 2 ) === '//' ) {
+                       // - Path is outside wgResourceBasePath, ignore.
+                       // - Path is protocol-relative. Fixes T155310. Not supported by RelPath lib.
                        return $path;
                }
                $path = RelPath\getRelativePath( $path, $remotePath );