Skip to content
This repository was archived by the owner on Nov 16, 2020. It is now read-only.
/ symfony1 Public archive

Commit 75d9b19

Browse files
committed
RELEASE_1_4_20 => v1.4.20 commit
1 parent 71bd1fb commit 75d9b19

File tree

139 files changed

+1727
-851
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+1727
-851
lines changed

CHANGELOG

+9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
CHANGELOG
22
=========
33

4+
11/25/12: Versions 1.4.20
5+
-------------------------
6+
7+
* [33598] fixed the possibility to fake a file upload
8+
* [33545] fixed sfPDOSessionStorage for Oracle (closes #10022)
9+
* [33544] fixed sfWebRequest::splitHttpAcceptHeader incorrect result order (closes #10069, patch by Keri Henare)
10+
* [33539] fixed exception format when using the PHP 5.4 built-in server (closes #10067, based on a patch from jgskin)
11+
* [33486] fixed sfPDODatabase::call() method (closes #10044)
12+
413
10/09/12: Versions 1.4.19
514
-------------------------
615

lib/autoload/sfAutoloadAgain.class.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* @package symfony
1515
* @subpackage autoload
1616
* @author Kris Wallsmith <kris.wallsmith@symfony-project.com>
17-
* @version SVN: $Id: sfAutoloadAgain.class.php 22248 2009-09-22 17:15:16Z fabien $
17+
* @version SVN: $Id: sfAutoloadAgain.class.php 33561 2012-10-18 11:42:28Z fabien $
1818
*/
1919
class sfAutoloadAgain
2020
{
@@ -69,7 +69,7 @@ public function autoload($class)
6969
{
7070
foreach ($autoloads as $position => $autoload)
7171
{
72-
if ($this === $autoload[0])
72+
if (is_array($autoload) && $this === $autoload[0])
7373
{
7474
break;
7575
}

lib/autoload/sfCoreAutoload.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
/**
1212
* The current symfony version.
1313
*/
14-
define('SYMFONY_VERSION', '1.4.19');
14+
define('SYMFONY_VERSION', '1.4.20');
1515

1616
/**
1717
* sfCoreAutoload class.

lib/debug/sfTimerManager.class.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* @package symfony
1515
* @subpackage util
1616
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
17-
* @version SVN: $Id: sfTimerManager.class.php 13339 2008-11-25 14:58:05Z fabien $
17+
* @version SVN: $Id: sfTimerManager.class.php 33570 2012-10-25 09:44:55Z fabien $
1818
*/
1919
class sfTimerManager
2020
{
@@ -29,14 +29,16 @@ class sfTimerManager
2929
*
3030
* @return sfTimer The timer instance
3131
*/
32-
public static function getTimer($name)
32+
public static function getTimer($name,$reset=true)
3333
{
3434
if (!isset(self::$timers[$name]))
3535
{
3636
self::$timers[$name] = new sfTimer($name);
3737
}
3838

39-
self::$timers[$name]->startTimer();
39+
if($reset){
40+
self::$timers[$name]->startTimer();
41+
}
4042

4143
return self::$timers[$name];
4244
}

lib/form/sfForm.class.php

+23-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* @package symfony
2424
* @subpackage form
2525
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
26-
* @version SVN: $Id: sfForm.class.php 29678 2010-05-30 14:38:42Z Kris.Wallsmith $
26+
* @version SVN: $Id: sfForm.class.php 33598 2012-11-25 09:57:29Z fabien $
2727
*/
2828
class sfForm implements ArrayAccess, Iterator, Countable
2929
{
@@ -222,6 +222,8 @@ public function bind(array $taintedValues = null, array $taintedFiles = null)
222222
$this->taintedFiles = array();
223223
}
224224

225+
$this->checkTaintedValues($this->taintedValues);
226+
225227
try
226228
{
227229
$this->doBind(self::deepArrayUnion($this->taintedValues, self::convertFileInformation($this->taintedFiles)));
@@ -1336,4 +1338,24 @@ static protected function deepArrayUnion($array1, $array2)
13361338

13371339
return $array1;
13381340
}
1341+
1342+
/**
1343+
* Checks that the $_POST values do not contain something that
1344+
* looks like a file upload (coming from $_FILE).
1345+
*/
1346+
protected function checkTaintedValues($values)
1347+
{
1348+
foreach ($values as $name => $value)
1349+
{
1350+
if (!is_array($value)) {
1351+
continue;
1352+
}
1353+
1354+
if (isset($value['tmp_name'])) {
1355+
throw new InvalidArgumentException('Do not try to fake a file upload.');
1356+
}
1357+
1358+
$this->checkTaintedValues($value);
1359+
}
1360+
}
13391361
}

lib/plugins/sfDoctrinePlugin/lib/database/sfDoctrineConnectionProfiler.class.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @package sfDoctrinePlugin
77
* @subpackage database
88
* @author Kris Wallsmith <kris.wallsmith@symfony-project.com>
9-
* @version SVN: $Id: sfDoctrineConnectionProfiler.class.php 20157 2009-07-13 17:00:12Z Kris.Wallsmith $
9+
* @version SVN: $Id: sfDoctrineConnectionProfiler.class.php 33570 2012-10-25 09:44:55Z fabien $
1010
*/
1111
class sfDoctrineConnectionProfiler extends Doctrine_Connection_Profiler
1212
{
@@ -82,7 +82,7 @@ public function preQuery(Doctrine_Event $event)
8282
*/
8383
public function postQuery(Doctrine_Event $event)
8484
{
85-
sfTimerManager::getTimer('Database (Doctrine)')->addTime();
85+
sfTimerManager::getTimer('Database (Doctrine)',false)->addTime();
8686

8787
$args = func_get_args();
8888
$this->__call(__FUNCTION__, $args);
@@ -118,7 +118,7 @@ public function preExec(Doctrine_Event $event)
118118
*/
119119
public function postExec(Doctrine_Event $event)
120120
{
121-
sfTimerManager::getTimer('Database (Doctrine)')->addTime();
121+
sfTimerManager::getTimer('Database (Doctrine)',false)->addTime();
122122

123123
$args = func_get_args();
124124
$this->__call(__FUNCTION__, $args);
@@ -154,7 +154,7 @@ public function preStmtExecute(Doctrine_Event $event)
154154
*/
155155
public function postStmtExecute(Doctrine_Event $event)
156156
{
157-
sfTimerManager::getTimer('Database (Doctrine)')->addTime();
157+
sfTimerManager::getTimer('Database (Doctrine)',false)->addTime();
158158

159159
$args = func_get_args();
160160
$this->__call(__FUNCTION__, $args);

lib/vendor/swiftmailer/classes/Swift.php

+18-6
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@
1818
abstract class Swift
1919
{
2020

21+
static $initialized = false;
22+
static $initPath;
23+
2124
/** Swift Mailer Version number generated during dist release process */
22-
const VERSION = '4.1.0-DEV';
25+
const VERSION = '4.1.8';
2326

2427
/**
2528
* Internal autoloader for spl_autoload_register().
@@ -29,28 +32,37 @@ abstract class Swift
2932
public static function autoload($class)
3033
{
3134
//Don't interfere with other autoloaders
32-
if (0 !== strpos($class, 'Swift'))
35+
if (0 !== strpos($class, 'Swift_'))
3336
{
34-
return false;
37+
return;
3538
}
3639

3740
$path = dirname(__FILE__).'/'.str_replace('_', '/', $class).'.php';
3841

3942
if (!file_exists($path))
4043
{
41-
return false;
44+
return;
45+
}
46+
47+
if (self::$initPath && !self::$initialized)
48+
{
49+
self::$initialized = true;
50+
require self::$initPath;
4251
}
4352

44-
require_once $path;
53+
require $path;
4554
}
4655

4756
/**
4857
* Configure autoloading using Swift Mailer.
4958
*
5059
* This is designed to play nicely with other autoloaders.
60+
*
61+
* @param string $initPath The init script to load when autoloading the first Swift class
5162
*/
52-
public static function registerAutoload()
63+
public static function registerAutoload($initPath = null)
5364
{
65+
self::$initPath = $initPath;
5466
spl_autoload_register(array('Swift', 'autoload'));
5567
}
5668

lib/vendor/swiftmailer/classes/Swift/Attachment.php

-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
* file that was distributed with this source code.
99
*/
1010

11-
//@require 'Swift/Mime/Attachment.php';
12-
//@require 'Swift/ByteStream/FileByteStream.php';
13-
//@require 'Swift/DependencyContainer.php';
1411

1512
/**
1613
* Attachment class for attaching files to a {@link Swift_Mime_Message}.

lib/vendor/swiftmailer/classes/Swift/ByteStream/AbstractFilterableInputStream.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
* file that was distributed with this source code.
99
*/
1010

11-
//@require 'Swift/InputByteStream.php';
12-
//@require 'Swift/Filterable.php';
13-
//@require 'Swift/StreamFilter.php';
1411

1512
/**
1613
* Provides the base functionality for an InputStream supporting filters.
@@ -23,7 +20,7 @@ abstract class Swift_ByteStream_AbstractFilterableInputStream
2320
{
2421

2522
/** Write sequence */
26-
private $_sequence = 0;
23+
protected $_sequence = 0;
2724

2825
/** StreamFilters */
2926
private $_filters = array();

lib/vendor/swiftmailer/classes/Swift/ByteStream/ArrayByteStream.php

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
* file that was distributed with this source code.
99
*/
1010

11-
//@require 'Swift/InputByteStream.php';
12-
//@require 'Swift/OutputByteStream.php';
1311

1412
/**
1513
* Allows reading and writing of bytes to and from an array.

0 commit comments

Comments
 (0)