protected final function FileTransfer::checkPath
Checks that the path is inside the jail and throws an exception if not.
Parameters
$path: A path to check against the jail.
12 calls to FileTransfer::checkPath()
- FileTransfer::chmod in drupal-7.x/
includes/ filetransfer/ filetransfer.inc - FileTransfer::chmod in drupal-7.x/
includes/ filetransfer/ filetransfer.inc - FileTransfer::copyDirectory in drupal-7.x/
includes/ filetransfer/ filetransfer.inc - Copies a directory.
- FileTransfer::copyDirectory in drupal-7.x/
includes/ filetransfer/ filetransfer.inc - Copies a directory.
- FileTransfer::copyFile in drupal-7.x/
includes/ filetransfer/ filetransfer.inc - Copies a file.
Archivo
- drupal-7.x/
includes/ filetransfer/ filetransfer.inc, line 157
Class
Código
protected final function checkPath($path) {
$full_jail = $this->chroot . $this->jail;
$full_path = drupal_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, array('@directory' => $path, '@jail' => $this->jail));
}
}