From affcad0948ecc263ab572b858c618a23c4adf5b9 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 19 Apr 2012 08:19:15 -0500 Subject: [PATCH 1/3] fix bug surrounding cookie session driver. --- laravel/session/drivers/driver.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/laravel/session/drivers/driver.php b/laravel/session/drivers/driver.php index 03e6fb2c..a8b9d4de 100644 --- a/laravel/session/drivers/driver.php +++ b/laravel/session/drivers/driver.php @@ -55,6 +55,14 @@ public function id() { $session = array(); + // If the driver is an instance of the Cookie driver, we are able to + // just return any string since the Cookie driver has no real idea + // of a server side persisted session with an ID. + if ($this instanceof Cookie) + { + return Str::random(40); + } + // We'll containue generating random IDs until we find an ID that is // not currently assigned to a session. This is almost definitely // going to happen on the first iteration. From af42dec07b910339392437507f94057a286d096c Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 19 Apr 2012 08:21:42 -0500 Subject: [PATCH 2/3] update change log and version. --- artisan | 2 +- changes.md | 12 ++++++++++++ paths.php | 2 +- public/index.php | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/artisan b/artisan index cc35412d..4e82030a 100644 --- a/artisan +++ b/artisan @@ -3,7 +3,7 @@ * Laravel - A PHP Framework For Web Artisans * * @package Laravel - * @version 3.1.8 + * @version 3.1.9 * @author Taylor Otwell * @link http://laravel.com */ diff --git a/changes.md b/changes.md index a0fecebe..be8d4378 100644 --- a/changes.md +++ b/changes.md @@ -2,6 +2,8 @@ ## Laravel Change Log ## Contents +- [Laravel 3.1.9](#3.1.9) +- [Upgrading From 3.1.8](#upgrade-3.1.9) - [Laravel 3.1.8](#3.1.8) - [Upgrading From 3.1.7](#upgrade-3.1.8) - [Laravel 3.1.7](#3.1.7) @@ -21,6 +23,16 @@ ## Contents - [Laravel 3.1](#3.1) - [Upgrading From 3.0](#upgrade-3.1) + +## Laravel 3.1.9 + +- Fixes cookie session driver bug that caused infinite loop on some occasions. + + +## Upgrading From 3.1.8 + +- Replace the **laravel** folder. + ## Laravel 3.1.8 diff --git a/paths.php b/paths.php index 5755eecf..7d0a3b5d 100644 --- a/paths.php +++ b/paths.php @@ -3,7 +3,7 @@ * Laravel - A PHP Framework For Web Artisans * * @package Laravel - * @version 3.1.8 + * @version 3.1.9 * @author Taylor Otwell * @link http://laravel.com */ diff --git a/public/index.php b/public/index.php index 2826b9bc..34375579 100644 --- a/public/index.php +++ b/public/index.php @@ -3,7 +3,7 @@ * Laravel - A PHP Framework For Web Artisans * * @package Laravel - * @version 3.1.8 + * @version 3.1.9 * @author Taylor Otwell * @link http://laravel.com */ From 8eae68bde0ed5ba98d291d5afabc4e79abbbd9af Mon Sep 17 00:00:00 2001 From: Julien TANT Date: Sat, 21 Apr 2012 14:51:03 +0200 Subject: [PATCH 3/3] Change htmlentities to urlencode for link Signed-off-by: Julien TANT --- laravel/html.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/laravel/html.php b/laravel/html.php index bcb69628..1377c6cc 100644 --- a/laravel/html.php +++ b/laravel/html.php @@ -62,7 +62,7 @@ public static function decode($value) */ public static function script($url, $attributes = array()) { - $url = static::entities(URL::to_asset($url)); + $url = urlencode(URL::to_asset($url)); return ''.PHP_EOL; } @@ -90,7 +90,7 @@ public static function style($url, $attributes = array()) $attributes = $attributes + $defaults; - $url = static::entities(URL::to_asset($url)); + $url = urlencode(URL::to_asset($url)); return ''.PHP_EOL; } @@ -126,7 +126,7 @@ public static function span($value, $attributes = array()) */ public static function link($url, $title, $attributes = array(), $https = false) { - $url = static::entities(URL::to($url, $https)); + $url = urlencode(URL::to($url, $https)); return ''.static::entities($title).''; } @@ -157,7 +157,7 @@ public static function link_to_secure($url, $title, $attributes = array()) */ public static function link_to_asset($url, $title, $attributes = array(), $https = null) { - $url = static::entities(URL::to_asset($url, $https)); + $url = urlencode(URL::to_asset($url, $https)); return ''.static::entities($title).''; } @@ -267,7 +267,7 @@ public static function image($url, $alt = '', $attributes = array()) { $attributes['alt'] = $alt; - return ''; + return ''; } /**