Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / lib / Drupal / Core / FileTransfer / FileTransfer.php
index f760a570bb8e4b931994de6c085e06ab7bf6c1c2..96eb175ab96de05c52c53e1deae737a975eb98ec 100644 (file)
@@ -207,7 +207,8 @@ abstract class FileTransfer {
    */
   final protected function checkPath($path) {
     $full_jail = $this->chroot . $this->jail;
-    $full_path = drupal_realpath(substr($this->chroot . $path, 0, strlen($full_jail)));
+    $full_path = \Drupal::service('file_system')
+      ->realpath(substr($this->chroot . $path, 0, strlen($full_jail)));
     $full_path = $this->fixRemotePath($full_path, FALSE);
     if ($full_jail !== $full_path) {
       throw new FileTransferException('@directory is outside of the @jail', NULL, ['@directory' => $path, '@jail' => $this->jail]);