From cdc67116c5e9ebba67a76045434e7b6fb7d1876b Mon Sep 17 00:00:00 2001 From: mark_story Date: Fri, 17 Oct 2014 23:12:41 -0400 Subject: [PATCH 1/5] Handle query string arguments in digest auth data. Handle &, ? in digest auth data uri. Refs #4908 --- lib/Cake/Controller/Component/Auth/DigestAuthenticate.php | 2 +- .../Case/Controller/Component/Auth/DigestAuthenticateTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Cake/Controller/Component/Auth/DigestAuthenticate.php b/lib/Cake/Controller/Component/Auth/DigestAuthenticate.php index cfda4741f..c40f4096d 100644 --- a/lib/Cake/Controller/Component/Auth/DigestAuthenticate.php +++ b/lib/Cake/Controller/Component/Auth/DigestAuthenticate.php @@ -162,7 +162,7 @@ class DigestAuthenticate extends BasicAuthenticate { } $keys = $match = array(); $req = array('nonce' => 1, 'nc' => 1, 'cnonce' => 1, 'qop' => 1, 'username' => 1, 'uri' => 1, 'response' => 1); - preg_match_all('/(\w+)=([\'"]?)([a-zA-Z0-9\:\#\%@=.\/_-]+)\2/', $digest, $match, PREG_SET_ORDER); + preg_match_all('/(\w+)=([\'"]?)([a-zA-Z0-9\:\#\%\?\&@=\.\/_-]+)\2/', $digest, $match, PREG_SET_ORDER); foreach ($match as $i) { $keys[$i[1]] = $i[3]; diff --git a/lib/Cake/Test/Case/Controller/Component/Auth/DigestAuthenticateTest.php b/lib/Cake/Test/Case/Controller/Component/Auth/DigestAuthenticateTest.php index 99a334fbd..c9373ab09 100644 --- a/lib/Cake/Test/Case/Controller/Component/Auth/DigestAuthenticateTest.php +++ b/lib/Cake/Test/Case/Controller/Component/Auth/DigestAuthenticateTest.php @@ -217,7 +217,7 @@ DIGEST; Digest username="Mufasa", realm="testrealm@host.com", nonce="dcd98b7102dd2f0e8b11d0f600bfb0c093", - uri="/dir/index.html", + uri="/dir/index.html?query=string&value=some%20value", qop=auth, nc=00000001, cnonce="0a4f113b", @@ -228,7 +228,7 @@ DIGEST; 'username' => 'Mufasa', 'realm' => 'testrealm@host.com', 'nonce' => 'dcd98b7102dd2f0e8b11d0f600bfb0c093', - 'uri' => '/dir/index.html', + 'uri' => '/dir/index.html?query=string&value=some%20value', 'qop' => 'auth', 'nc' => '00000001', 'cnonce' => '0a4f113b', From 959a22a8b2c81c71fc53245463ed19f67f169816 Mon Sep 17 00:00:00 2001 From: dmromanov Date: Sun, 19 Oct 2014 00:05:08 +0400 Subject: [PATCH 2/5] Documentation correction --- lib/Cake/Utility/CakeTime.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Utility/CakeTime.php b/lib/Cake/Utility/CakeTime.php index 47ca44fe5..6e76351ad 100644 --- a/lib/Cake/Utility/CakeTime.php +++ b/lib/Cake/Utility/CakeTime.php @@ -357,7 +357,7 @@ class CakeTime { * * @param int|string|DateTime $dateString UNIX timestamp, strtotime() valid string or DateTime object * @param string|DateTimeZone $timezone Timezone string or DateTimeZone object - * @param string $format The format to use. If null, `TimeHelper::$niceFormat` is used + * @param string $format The format to use. If null, `CakeTime::$niceFormat` is used * @return string Formatted date string * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#TimeHelper::nice */ From 3a3ddf414c219671d65ef61870ea078621ab3817 Mon Sep 17 00:00:00 2001 From: Alexander Garzon Date: Tue, 21 Oct 2014 10:33:46 -0400 Subject: [PATCH 3/5] Update .gitattributes PDF is a common file that should not be modified. --- .gitattributes | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 6f57884e4..cc576ac79 100644 --- a/.gitattributes +++ b/.gitattributes @@ -31,4 +31,5 @@ *.jpg binary *.gif binary *.ico binary -*.mo binary \ No newline at end of file +*.mo binary +*.pdf binary From 09ebb8baced1bab9a620a7cb3a6d865417f6201b Mon Sep 17 00:00:00 2001 From: Alexander Garzon Date: Tue, 21 Oct 2014 14:11:51 -0400 Subject: [PATCH 4/5] Removing unrelated parameter in comment That parameter doesn't exists in display() function (in fact is not a parameter) and is breaking the [CakePHP code standards]:https://github.com/cakephp/cakephp-codesniffer --- app/Controller/PagesController.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/Controller/PagesController.php b/app/Controller/PagesController.php index 5073f2e1a..97b782ac7 100644 --- a/app/Controller/PagesController.php +++ b/app/Controller/PagesController.php @@ -40,7 +40,6 @@ class PagesController extends AppController { /** * Displays a view * - * @param mixed What page to display * @return void * @throws NotFoundException When the view file could not be found * or MissingViewException in debug mode. From 6f4c3b2765fbfbff0ef80291f2f31b3ba9b29dfc Mon Sep 17 00:00:00 2001 From: Bryan Crowe Date: Tue, 21 Oct 2014 14:39:09 -0400 Subject: [PATCH 5/5] Fix views overwrite warning text --- lib/Cake/Console/Command/Task/ViewTask.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Console/Command/Task/ViewTask.php b/lib/Cake/Console/Command/Task/ViewTask.php index 8c84442b8..2c49775dc 100644 --- a/lib/Cake/Console/Command/Task/ViewTask.php +++ b/lib/Cake/Console/Command/Task/ViewTask.php @@ -206,7 +206,7 @@ class ViewTask extends BakeTask { $this->Controller->connection = $this->connection; $this->controllerName = $this->Controller->getName(); - $prompt = __d('cake_console', "Would you like bake to build your views interactively?\nWarning: Choosing no will overwrite %s views if it exist.", $this->controllerName); + $prompt = __d('cake_console', "Would you like bake to build your views interactively?\nWarning: Choosing no will overwrite %s views if they exist.", $this->controllerName); $interactive = $this->in($prompt, array('y', 'n'), 'n'); if (strtolower($interactive) === 'n') {