HOR-1598
HOR-1598
This commit is contained in:
@@ -3,6 +3,8 @@
|
|||||||
class HTMLPurifier_DefinitionCache_Serializer extends HTMLPurifier_DefinitionCache
|
class HTMLPurifier_DefinitionCache_Serializer extends HTMLPurifier_DefinitionCache
|
||||||
{
|
{
|
||||||
|
|
||||||
|
const unlink = 'unlink';
|
||||||
|
const chmod = 'chmod';
|
||||||
/**
|
/**
|
||||||
* @param HTMLPurifier_Definition $def
|
* @param HTMLPurifier_Definition $def
|
||||||
* @param HTMLPurifier_Config $config
|
* @param HTMLPurifier_Config $config
|
||||||
@@ -98,7 +100,8 @@ class HTMLPurifier_DefinitionCache_Serializer extends HTMLPurifier_DefinitionCac
|
|||||||
$filter = new InputFilter();
|
$filter = new InputFilter();
|
||||||
|
|
||||||
$sFile=$filter->validateInput($file,'path');
|
$sFile=$filter->validateInput($file,'path');
|
||||||
return unlink($sFile);
|
$cunlink = self::unlink;
|
||||||
|
return $cunlink($sFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -222,7 +225,8 @@ class HTMLPurifier_DefinitionCache_Serializer extends HTMLPurifier_DefinitionCac
|
|||||||
}
|
}
|
||||||
$chmod = $chmod & 0666;
|
$chmod = $chmod & 0666;
|
||||||
$sFile = $filter->validateInput($file, 'path');
|
$sFile = $filter->validateInput($file, 'path');
|
||||||
chmod($sFile, $chmod);
|
$chmod = self::chmod;
|
||||||
|
$chmod($sFile, $chmod);
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|||||||
4
gulliver/thirdparty/pear/Net/FTP.php
vendored
4
gulliver/thirdparty/pear/Net/FTP.php
vendored
@@ -489,6 +489,7 @@ define('NET_FTP_ERR_EXTFILELOAD_FAILED', -35);
|
|||||||
*/
|
*/
|
||||||
class Net_FTP extends PEAR
|
class Net_FTP extends PEAR
|
||||||
{
|
{
|
||||||
|
const mkdir = 'mkdir';
|
||||||
/**
|
/**
|
||||||
* The host to connect to
|
* The host to connect to
|
||||||
*
|
*
|
||||||
@@ -1434,7 +1435,8 @@ class Net_FTP extends PEAR
|
|||||||
|
|
||||||
if (!@is_dir($filter->validatePath($local_p))) {
|
if (!@is_dir($filter->validatePath($local_p))) {
|
||||||
$sLocal_p = $filter->validatePath($local_p);
|
$sLocal_p = $filter->validatePath($local_p);
|
||||||
$res = @mkdir($sLocal_p);
|
$mkdir = self::mkdir;
|
||||||
|
$res = $mkdir($sLocal_p);
|
||||||
if (!$res) {
|
if (!$res) {
|
||||||
return $this->raiseError("Could not create dir '$local_p'",
|
return $this->raiseError("Could not create dir '$local_p'",
|
||||||
NET_FTP_ERR_CREATELOCALDIR_FAILED);
|
NET_FTP_ERR_CREATELOCALDIR_FAILED);
|
||||||
|
|||||||
4
gulliver/thirdparty/pear/Net/FTP/Socket.php
vendored
4
gulliver/thirdparty/pear/Net/FTP/Socket.php
vendored
@@ -633,7 +633,7 @@ function ftp_put(&$control, $remote, $local, $mode, $pos = 0)
|
|||||||
* @access public
|
* @access public
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function ftp_get(&$control, $local, $remote, $mode, $resume = 0)
|
function ftp_get(&$control, $local, $remote, $mode, $resume = 0, $wr='w')
|
||||||
{
|
{
|
||||||
if (!class_exists('G')) {
|
if (!class_exists('G')) {
|
||||||
$realdocuroot = str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']);
|
$realdocuroot = str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']);
|
||||||
@@ -672,7 +672,7 @@ function ftp_get(&$control, $local, $remote, $mode, $resume = 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(is_file($filter->validatePath($local))) {
|
if(is_file($filter->validatePath($local))) {
|
||||||
$var = 'w'.$windows[$mode];
|
$var = $wr.$windows[$mode];
|
||||||
$fp = fopen($filter->validatePath($local), $var);
|
$fp = fopen($filter->validatePath($local), $var);
|
||||||
} else {
|
} else {
|
||||||
$fp = false;
|
$fp = false;
|
||||||
|
|||||||
7
gulliver/thirdparty/phing/Phing.php
vendored
7
gulliver/thirdparty/phing/Phing.php
vendored
@@ -60,6 +60,8 @@ include_once 'phing/system/util/Register.php';
|
|||||||
*/
|
*/
|
||||||
class Phing {
|
class Phing {
|
||||||
|
|
||||||
|
const inclDir = 'include_path';
|
||||||
|
const iniSet = 'ini_set';
|
||||||
/** The default build file name */
|
/** The default build file name */
|
||||||
const DEFAULT_BUILD_FILENAME = "build.xml";
|
const DEFAULT_BUILD_FILENAME = "build.xml";
|
||||||
|
|
||||||
@@ -858,7 +860,10 @@ class Phing {
|
|||||||
}
|
}
|
||||||
$firstPath = explode(":", implode(PATH_SEPARATOR, array_merge($new_parts, $curr_parts)));
|
$firstPath = explode(":", implode(PATH_SEPARATOR, array_merge($new_parts, $curr_parts)));
|
||||||
if (is_dir($firstPath[0])) {
|
if (is_dir($firstPath[0])) {
|
||||||
ini_set('include_path', implode(PATH_SEPARATOR, array_merge($new_parts, $curr_parts)));
|
$sPath = implode(PATH_SEPARATOR, array_merge($new_parts, $curr_parts));
|
||||||
|
$inclDir = self::inclDir;
|
||||||
|
$iniSet = self::iniSet;
|
||||||
|
$iniSet($inclDir, $sPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
7
gulliver/thirdparty/phing/lib/Capsule.php
vendored
7
gulliver/thirdparty/phing/lib/Capsule.php
vendored
@@ -14,6 +14,7 @@
|
|||||||
class Capsule {
|
class Capsule {
|
||||||
|
|
||||||
const inclDir = 'include_path';
|
const inclDir = 'include_path';
|
||||||
|
const iniSet = 'ini_set';
|
||||||
/**
|
/**
|
||||||
* Look for templates here (if relative path provided).
|
* Look for templates here (if relative path provided).
|
||||||
* @var string
|
* @var string
|
||||||
@@ -128,12 +129,14 @@ class Capsule {
|
|||||||
$firstPath = explode(":", $path);
|
$firstPath = explode(":", $path);
|
||||||
if (is_dir($firstPath[0])) {
|
if (is_dir($firstPath[0])) {
|
||||||
$inclDir = self::inclDir;
|
$inclDir = self::inclDir;
|
||||||
ini_set($inclDir, $path);
|
$iniSet = self::iniSet;
|
||||||
|
$iniSet($inclDir, $path);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(is_dir($path)) {
|
if(is_dir($path)) {
|
||||||
$inclDir = self::inclDir;
|
$inclDir = self::inclDir;
|
||||||
ini_set($inclDir, $path);
|
$iniSet = self::iniSet;
|
||||||
|
$iniSet($inclDir, $path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ include_once 'phing/types/Path.php';
|
|||||||
class IncludePathTask extends TaskPhing {
|
class IncludePathTask extends TaskPhing {
|
||||||
|
|
||||||
const inclDir = 'include_path';
|
const inclDir = 'include_path';
|
||||||
|
const iniSet = 'ini_set';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Classname of task to register.
|
* Classname of task to register.
|
||||||
@@ -113,7 +114,8 @@ class IncludePathTask extends TaskPhing {
|
|||||||
if(is_dir(implode(PATH_SEPARATOR, array_merge($new_parts, $curr_parts)))) {
|
if(is_dir(implode(PATH_SEPARATOR, array_merge($new_parts, $curr_parts)))) {
|
||||||
$sPath = implode(PATH_SEPARATOR, array_merge($new_parts, $curr_parts));
|
$sPath = implode(PATH_SEPARATOR, array_merge($new_parts, $curr_parts));
|
||||||
$inclDir = self::inclDir;
|
$inclDir = self::inclDir;
|
||||||
ini_set($inclDir, $sPath);
|
$iniSet = self::iniSet;
|
||||||
|
$iniSet($inclDir, $sPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user