"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "framework/yiilite.php" between
yii-1.1.21.733ac5.tar.gz and yii-1.1.22.bf1d26.tar.gz

About: Yii is a high-performance component-based PHP framework for developing large-scale Web applications. Hint: Yii 1.1 is now in maintenance mode.

yiilite.php  (yii-1.1.21.733ac5):yiilite.php  (yii-1.1.22.bf1d26)
skipping to change at line 43 skipping to change at line 43
public static $autoloaderFilters=array(); public static $autoloaderFilters=array();
public static $classMap=array(); public static $classMap=array();
public static $enableIncludePath=true; public static $enableIncludePath=true;
private static $_aliases=array('system'=>YII_PATH,'zii'=>YII_ZII_PATH); / / alias => path private static $_aliases=array('system'=>YII_PATH,'zii'=>YII_ZII_PATH); / / alias => path
private static $_imports=array(); / / alias => class name or directory private static $_imports=array(); / / alias => class name or directory
private static $_includePaths; / / list of include paths private static $_includePaths; / / list of include paths
private static $_app; private static $_app;
private static $_logger; private static $_logger;
public static function getVersion() public static function getVersion()
{ {
return '1.1.21'; return '1.1.22';
} }
public static function createWebApplication($config=null) public static function createWebApplication($config=null)
{ {
return self::createApplication('CWebApplication',$config); return self::createApplication('CWebApplication',$config);
} }
public static function createConsoleApplication($config=null) public static function createConsoleApplication($config=null)
{ {
return self::createApplication('CConsoleApplication',$config); return self::createApplication('CConsoleApplication',$config);
} }
public static function createApplication($class,$config=null) public static function createApplication($class,$config=null)
skipping to change at line 2327 skipping to change at line 2327
private $_restParams; private $_restParams;
private $_httpVersion; private $_httpVersion;
public function init() public function init()
{ {
parent::init(); parent::init();
$this->normalizeRequest(); $this->normalizeRequest();
} }
protected function normalizeRequest() protected function normalizeRequest()
{ {
// normalize request // normalize request
if(function_exists('get_magic_quotes_gpc') && get_magic_quotes_gp c()) if(version_compare(PHP_VERSION,'7.4.0','<'))
{ {
if(isset($_GET)) if(function_exists('get_magic_quotes_gpc') && get_magic_q
$_GET=$this->stripSlashes($_GET); uotes_gpc())
if(isset($_POST)) {
$_POST=$this->stripSlashes($_POST); if(isset($_GET))
if(isset($_REQUEST)) $_GET=$this->stripSlashes($_GET);
$_REQUEST=$this->stripSlashes($_REQUEST); if(isset($_POST))
if(isset($_COOKIE)) $_POST=$this->stripSlashes($_POST);
$_COOKIE=$this->stripSlashes($_COOKIE); if(isset($_REQUEST))
$_REQUEST=$this->stripSlashes($_REQUEST);
if(isset($_COOKIE))
$_COOKIE=$this->stripSlashes($_COOKIE);
}
} }
if($this->enableCsrfValidation) if($this->enableCsrfValidation)
Yii::app()->attachEventHandler('onBeginRequest',array($th is,'validateCsrfToken')); Yii::app()->attachEventHandler('onBeginRequest',array($th is,'validateCsrfToken'));
} }
public function stripSlashes(&$data) public function stripSlashes(&$data)
{ {
if(is_array($data)) if(is_array($data))
{ {
if(count($data) == 0) if(count($data) == 0)
return $data; return $data;
skipping to change at line 3092 skipping to change at line 3095
$this->removeCookie($cookie); $this->removeCookie($cookie);
} }
} }
return $cookie; return $cookie;
} }
protected function addCookie($cookie) protected function addCookie($cookie)
{ {
$value=$cookie->value; $value=$cookie->value;
if($this->_request->enableCookieValidation) if($this->_request->enableCookieValidation)
$value=Yii::app()->getSecurityManager()->hashData(seriali ze($value)); $value=Yii::app()->getSecurityManager()->hashData(seriali ze($value));
if(version_compare(PHP_VERSION,'5.2.0','>=')) if(version_compare(PHP_VERSION,'7.3.0','>='))
setcookie($cookie->name,$value,$this->getCookieOptions($c
ookie));
elseif(version_compare(PHP_VERSION,'5.2.0','>='))
setcookie($cookie->name,$value,$cookie->expire,$cookie->p ath,$cookie->domain,$cookie->secure,$cookie->httpOnly); setcookie($cookie->name,$value,$cookie->expire,$cookie->p ath,$cookie->domain,$cookie->secure,$cookie->httpOnly);
else else
setcookie($cookie->name,$value,$cookie->expire,$cookie->p ath,$cookie->domain,$cookie->secure); setcookie($cookie->name,$value,$cookie->expire,$cookie->p ath,$cookie->domain,$cookie->secure);
} }
protected function removeCookie($cookie) protected function removeCookie($cookie)
{ {
if(version_compare(PHP_VERSION,'5.2.0','>=')) $cookie->expire=0;
setcookie($cookie->name,'',0,$cookie->path,$cookie->domai if(version_compare(PHP_VERSION,'7.3.0','>='))
n,$cookie->secure,$cookie->httpOnly); setcookie($cookie->name,'',$this->getCookieOptions($cooki
else e));
setcookie($cookie->name,'',0,$cookie->path,$cookie->domai elseif(version_compare(PHP_VERSION,'5.2.0','>='))
n,$cookie->secure); setcookie($cookie->name,'',$cookie->expire,$cookie->path,
$cookie->domain,$cookie->secure,$cookie->httpOnly);
else
setcookie($cookie->name,'',$cookie->expire,$cookie->path,
$cookie->domain,$cookie->secure);
}
protected function getCookieOptions($cookie)
{
return array(
'expires'=>$cookie->expire,
'path'=>$cookie->path,
'domain'=>$cookie->domain,
'secure'=>$cookie->secure,
'httpOnly'=>$cookie->httpOnly,
'sameSite'=>$cookie->sameSite
);
} }
} }
class CUrlManager extends CApplicationComponent class CUrlManager extends CApplicationComponent
{ {
const CACHE_KEY='Yii.CUrlManager.rules'; const CACHE_KEY='Yii.CUrlManager.rules';
const GET_FORMAT='get'; const GET_FORMAT='get';
const PATH_FORMAT='path'; const PATH_FORMAT='path';
public $rules=array(); public $rules=array();
public $urlSuffix=''; public $urlSuffix='';
public $showScriptName=true; public $showScriptName=true;
 End of changes. 5 change blocks. 
17 lines changed or deleted 39 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)