Commit graph

597 commits

Author SHA1 Message Date
Bryan Crowe
4242bd4f3d Additional Cake references to CakePHP and docblock typo 2013-10-09 19:38:16 -04:00
Bryan Crowe
c1dd0e4393 Changed url to URL where appropriate 2013-10-07 23:17:58 -04:00
mark_story
60b0893c79 Merge branch 'master' into 2.5 2013-10-06 23:49:32 -03:00
mark_story
314ae1c8b4 Merge branch 'master' of github.com:cakephp/cakephp 2013-10-01 15:12:34 -04:00
Simon Males
c998888fe7 Do not assume CONTENT_TYPE is available.
In some server environments notably the CLI server, _SERVER['CONTENT_TYPE'] is not available.
In these cases, fall back to the HTTP_CONTENT_TYPE header.

Refs #GH-1661
2013-10-01 15:10:33 -04:00
mark_story
5e9b22271a Merge branch 'master' into 2.5 2013-09-27 22:26:33 -04:00
Frank de Graaf
3e8af8b180 Merge pull request #1689 from dereuromark/master-cakephp-name
Cake to CakePHP name
2013-09-27 12:16:25 -07:00
Frank de Graaf
ceb78fee9c Merge pull request #1671 from ADmad/bugfix/auth-infinite-redirect
Fixed infinite redirects when authenticated user tried to access login p...
2013-09-27 12:13:36 -07:00
euromark
df269ba0ef Cake to CakePHP name 2013-09-27 19:36:43 +02:00
ADmad
4dbf9107a8 Fixed infinite redirects for authenticated users accessing login page. 2013-09-27 22:33:07 +05:30
mark_story
cc5795c67d Merge branch 'master' into 2.5 2013-09-26 10:07:10 -04:00
Bryan Crowe
ab4bc16463 Updated Controller:: doc block and ControllerMergeVarsTest:: 2013-09-25 22:53:23 -04:00
Bryan Crowe
915b51b239 Updated JavaScript casing and JsHelper references in doc blocks 2013-09-25 22:46:38 -04:00
Bryan Crowe
1393325ad1 Use instanceof instead of is_a() in Controller.php 2013-09-23 21:37:27 -04:00
mark_story
a7a6fcae8a Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/VERSION.txt
2013-09-17 10:11:24 -04:00
euromark
e3a3946e89 address casting cs 2013-09-17 15:15:25 +02:00
euromark
12f2f729c8 more cs 2013-09-17 14:53:07 +02:00
euromark
382f75dbfc cs corrections, bool to boolean and int to integer. 2013-09-17 14:44:34 +02:00
mark_story
a2bd91638e Merge branch 'master' into 2.5 2013-09-12 19:47:13 -04:00
euromark
a796b26f13 fix renderLayout and update deprecated and outdated code 2013-09-13 00:09:31 +02:00
ADmad
1d0c785725 Fixed setting of order in Paginator options when using model's order. Refs f680c76, #3902 2013-09-10 22:47:31 +05:30
mark_story
59bb05b433 Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/VERSION.txt
2013-09-02 11:35:09 -04:00
Renan Gonçalves
6750a65e1b Merge pull request #1568 from markstory/2.5-encrypt
2.5 - Add Security::encrypt() and Security::decrypt()
2013-09-02 01:19:47 -07:00
euromark
a36456cc87 Correct doc blocks for AuthComponent 2013-08-31 19:58:10 -07:00
mark_story
005a7d841d Add support for aes encrypted cookies.
With Security supporting AES encryption it is also ideal to have AES
compatible cookies. Refactor and simplify code. Dynamic invocation of
static method is a bit obtuse and the various methods don't all have the
same arguments.
2013-08-27 21:34:18 -04:00
euromark
1aba204ec7 remove $name where not necessary to unify this in 2.x 2013-08-25 21:19:55 +02:00
euromark
361980fade remove code, class names and paths from translation strings. 2013-08-21 00:05:53 +02:00
mark_story
0f2d59d987 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Network/CakeResponse.php
	lib/Cake/TestSuite/CakeTestCase.php
2013-08-18 23:10:08 -04:00
euromark
6cf147e8c8 unify null checks - avoid method call in favor of strict check 2013-08-16 20:12:49 +02:00
dmromanov
56ef44f495 Excluded method names from several tanslation strings
Removed unnecessary sprintfs
2013-08-16 13:42:28 +04:00
mark_story
26769edd04 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Utility/CakeTime.php
	lib/Cake/VERSION.txt
2013-08-12 14:39:02 -04:00
Mark Story
2f5963e2d3 Merge pull request #1496 from ravage84/else-clause-after-redirect
Removed else clauses after redirects and added return before redirect() ...
2013-08-12 11:05:39 -07:00
euromark
b09dc7213a deprecate Controller::flash() and adjust some other deprecation messages. 2013-08-12 12:51:12 +02:00
Jose Lorenzo Rodriguez
9d07fc4330 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Console/ShellDispatcher.php
	lib/Cake/Utility/CakeNumber.php
	lib/Cake/View/Elements/sql_dump.ctp
2013-08-11 23:31:10 +02:00
Marc Würth
4c13a39f3e Removed else clauses after redirects and added return before redirect() and flash() calls 2013-08-08 21:10:41 +02:00
euromark
fc2d28974b remove undocumented code and uncessary in_array() checks + cleanup 2013-08-08 03:56:58 +02:00
mark_story
9efad54e31 Fix missing expiry times on cookies.
When writing multiple cookies in a single request with the default
expiry time, cookies after the first should continue to have the default
expiry time used.

Fixes #3965
2013-08-06 22:01:13 -04:00
ADmad
38b050a711 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Console/Command/ConsoleShell.php
2013-08-04 19:26:55 +05:30
Simon Males
0adef209e3 Camel case SecurityComponent::blackHole() method call 2013-08-02 12:07:33 +08:00
mark_story
95b74bd9ef Make sure ComponentCollection has the controller dependency.
Add setter method as changing ComponentCollection's constructor now is
not possible. This fixes issues where components that rely on
Collection->getController() in their constructor can work properly.

Fixes #3946
2013-07-30 09:09:52 -04:00
ADmad
a691e70065 Docblock and return type fixes 2013-07-29 19:13:31 +05:30
Phally
a70e004cda Corrects bad merge.
Bad merge: d161b21ae1

Fixes #3938.
2013-07-26 20:00:32 +02:00
Phally
6b41eaa950 Merge branch 'master' into 2.4 2013-07-26 19:44:11 +02:00
Phally
f7eab23a5c Strips the base off the generated URL from the AuthComponent.
Fixes #3922.
2013-07-26 15:18:28 +02:00
euromark
8b21710c95 whitespace correction 2013-07-25 13:26:21 +02:00
mark_story
e03d3df0fe Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Test/Case/View/HelperTest.php
	lib/Cake/VERSION.txt
2013-07-17 22:40:09 -04:00
mark_story
a8f4ec0450 Simplify whitelist logic. 2013-07-16 19:33:06 -04:00
mark_story
b873186468 Fix being unable to sort on custom synthetic columns.
If a sort field whitelist is used we should trust its data and also
trust that the developer wanted what they asked for. This solves issues
where it was impossible to sort on synthetic columns added in custom
find types.

Fixes #3919
2013-07-16 10:19:18 -04:00
ADmad
d161b21ae1 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Controller/Component/AuthComponent.php
2013-07-14 10:58:55 +05:30
mark_story
d40c7376ce Rebalance where URL normalization happens in AuthComponent.
Make URL's not include the base path when storing them in the session.
This makes future redirection simpler. When URL's are an array use
Router::url() on them.

Fixes #3916
2013-07-12 21:54:22 -04:00
mark_story
8133f72b53 Update AuthComponent to not strip when normalizing URLs.
Revert most of the changes done to fix #3897 originally and try
a different strategy of solving the base path issues and not breaking
apps running in a subdirectory.

Fixes #3916
2013-07-12 21:17:25 -04:00
ADmad
4ded269549 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Controller/Component/Auth/BlowfishAuthenticate.php
	lib/Cake/VERSION.txt
2013-07-07 12:22:12 +05:30
Marc Würth
a397f034e6 Some love for a deprecated class
Whitespace and wording.

Optionally we could include a version number until when this class will work. I assumed this will be 3.0...
http://www.phpdoc.org/docs/latest/for-users/phpdoc/tags/deprecated.html
I treid that but after I let apigen generate the doc and I saw it did nothing special about it ;-/
2013-07-06 19:50:26 +02:00
euromark
af455b4121 correct return types in doc blocks 2013-07-05 17:19:22 +02:00
euromark
e7f380d2b7 doublespace to single space 2013-07-05 14:36:40 +02:00
euromark
c989624f80 whitespace coding standards 2013-07-05 14:15:18 +02:00
mark_story
22a198a8ba Merge branch 'master' into 2.4 2013-07-04 21:40:51 -04:00
euromark
f680c763b2 ticket-3902 - paginator and display of order via model default order 2013-07-04 13:07:14 +02:00
José Lorenzo Rodríguez
9c4775a220 Merge pull request #1393 from markstory/constant-time-login
Hash passwords even when users don't exist.
2013-07-03 13:49:03 -07:00
mark_story
c597855fe4 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Test/Case/Network/CakeRequestTest.php
2013-07-03 14:21:09 -04:00
euromark
f389435bae coding standards and else block simplification 2013-07-03 19:27:17 +02:00
euromark
7cb19b97db coding standards and simplification of else cases as well as some minor fixes 2013-07-03 00:52:48 +02:00
mark_story
17e4eee73d Hash passwords even when users don't exist.
Not hashing passwords when users don't exist means there is an
opportunity for timing attacks when people use blowfish or other
expensive hashing algorithms.
2013-07-01 21:52:15 -04:00
Mark Story
94db8fbed6 Merge pull request #1380 from ceeram/2.4-ext
Set extension with multiple accept based on order in parseExtensions.
2013-06-30 19:42:50 -07:00
Marc Würth
e84bf65016 Typo in FormAuthenticate.php 2013-07-01 00:03:03 +02:00
mark_story
f09693f6e8 Merge branch 'master' into 2.4 2013-06-29 23:26:26 -04:00
mark_story
1d18a4f702 Fix issue where redirectURLs were not generated correctly.
When the first path segment matches the base path an incorrect URL was
generated. Trimming slashes off makes Router normalize the URL correctly
as the leading / implies that the base is already prepended.

Fixes #3897
2013-06-29 23:26:13 -04:00
Ceeram
6a0185d7e6 Set extension with multiple accept based on order in parseExtensions, currently with multiple accepted types, no extension is set at all 2013-06-27 14:34:00 +02:00
mark_story
dcf7df39d2 Merge branch 'master' into 2.4 2013-06-21 17:47:37 -04:00
Marc Würth
2418ea0a57 Fixed typo in AuthComponent::redirectUrl 2013-06-21 16:49:31 +02:00
Rachman Chavik
0d486bdab4 AuthComponent: Allow suppressing authError message
When unauthenticated users accesses protected areas, they are greeted
with the default 'You are not allowed to access that location' which is
not desired in some cases.

This patch allows applications to suppress this message by setting
AuthComponent::authError to false bypassing the call to
SessionComponent::setFlash() altogether.

Refs: https://github.com/croogo/croogo/pull/175#discussion_r4714240
2013-06-17 09:33:59 +07:00
mark_story
cd3c54bb9d Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/VERSION.txt
2013-06-10 22:12:10 -04:00
euromark
4518624187 more whitespace coding standard corrections 2013-06-09 17:39:48 +02:00
ADmad
636cc8c103 Merge branch 'master' into 2.4 2013-06-09 18:08:32 +05:30
mark_story
3aa189eb3a Fix cookie expiry time calculation on 32bit systems.
strtotime() misbehaves on 32bit systems when the resulting timestamp
would overflow an integer. Use a DateTime to workaround this issue.

Fixes #3868
2013-06-03 20:16:18 -04:00
ADmad
f3c69c9f40 docblock updates 2013-06-03 01:04:00 +05:30
ADmad
3303a2cda1 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Console/Templates/skel/Config/Schema/db_acl.php
	lib/Cake/Console/Templates/skel/Config/Schema/i18n.php
	lib/Cake/Console/Templates/skel/Config/Schema/sessions.php
	lib/Cake/Console/Templates/skel/Config/acl.ini.php
	lib/Cake/Console/Templates/skel/Config/acl.php
	lib/Cake/Console/Templates/skel/Config/bootstrap.php
	lib/Cake/Console/Templates/skel/Config/core.php
	lib/Cake/Console/Templates/skel/Config/database.php.default
	lib/Cake/Console/Templates/skel/Config/email.php.default
	lib/Cake/Console/Templates/skel/Config/routes.php
	lib/Cake/Console/Templates/skel/Console/Command/AppShell.php
	lib/Cake/Console/Templates/skel/Console/cake.bat
	lib/Cake/Console/Templates/skel/Console/cake.php
	lib/Cake/Console/Templates/skel/Controller/AppController.php
	lib/Cake/Console/Templates/skel/Controller/PagesController.php
	lib/Cake/Console/Templates/skel/Model/AppModel.php
	lib/Cake/Console/Templates/skel/View/Errors/error400.ctp
	lib/Cake/Console/Templates/skel/View/Errors/error500.ctp
	lib/Cake/Console/Templates/skel/View/Helper/AppHelper.php
	lib/Cake/Console/Templates/skel/View/Layouts/Emails/html/default.ctp
	lib/Cake/Console/Templates/skel/View/Layouts/ajax.ctp
	lib/Cake/Console/Templates/skel/View/Layouts/default.ctp
	lib/Cake/Console/Templates/skel/View/Layouts/error.ctp
	lib/Cake/Console/Templates/skel/View/Layouts/flash.ctp
	lib/Cake/Console/Templates/skel/View/Pages/home.ctp
	lib/Cake/Console/Templates/skel/index.php
	lib/Cake/Console/Templates/skel/webroot/index.php
	lib/Cake/Console/Templates/skel/webroot/test.php
2013-06-02 18:03:59 +05:30
Marc Würth
4c9f0414cb Improved the DocBlocks and other code cleanup
Fixed @license tag, url comes first
Whitespace and other minor code cleanup
Added some docblocks
2013-05-31 00:11:19 +02:00
ADmad
00f972f033 Deprecated AuthComponent::password() 2013-05-27 00:25:42 +05:30
ADmad
56fa0dccda Remove unnecessary overriding of '_findUser()' in 'DigestAuthenticate'. 2013-05-26 12:31:40 +05:30
ADmad
dd2892ad8d Added password hasher 2013-05-26 11:29:06 +05:30
ADmad
36c592e72e Merge branch 'master' into 2.4 2013-05-26 11:23:53 +05:30
Rachman Chavik
a63b54c34b Fix: Incorrect model being used as Controller::$modelClass
We cannot be sure that Controller::$uses have not been iterated, so
reset the array to use the first value.
2013-05-24 17:50:43 +07:00
ADmad
fb86859585 Merge branch 'master' into 2.4 2013-05-19 14:37:41 +05:30
mark_story
e23c4ffad9 Fix empty response bodies when redirect URL's are empty.
When redirecting XHR requests to an empty URL the response body should
not be overwritten.

Fixes #3835
2013-05-17 16:33:08 -04:00
mark_story
72b75660e5 Merge branch 'master' into 2.4 2013-05-16 21:31:27 -04:00
euromark
0822578813 $this->modelClass needs to be correct prior to the components init() call if the component itself accesses the model, lazyloading would try to load the wrong model otherwise 2013-05-14 10:17:57 +02:00
ADmad
a10275fb8b Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php
2013-05-05 14:36:46 +05:30
mark_story
4f179b01bd Make note of method removal. 2013-05-04 15:03:04 -04:00
mark_story
2096d3f632 Clamp limit values to be unsigned integers.
This solves large page numbers potentially turning into scientific
notation when being formatted into queries. It also further safeguards
against SQL manipulation.

Refs #GH-1263
2013-05-02 22:36:50 -04:00
mark_story
37ce6dfc81 Only allow sort fields that match the current object alias.
Instead of modifying aliases that do not match, only allow aliases that
do match.

Refs #3803
2013-04-30 12:41:42 -04:00
euromark
09d9efe235 spelling corrections (a url to an URL, unify URL) 2013-04-29 11:05:17 +02:00
mark_story
62186ac8da Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/VERSION.txt
2013-04-28 17:00:30 -04:00
mark_story
c327bdc4bd Enforce model aliases when generating order by clauses.
Invalid SQL could be created by sorting on an invalid alias, with
a field that exists on the model.

Fixes #3797
2013-04-27 13:29:29 -04:00
ADmad
19f8274a95 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/VERSION.txt
2013-04-25 03:06:04 +05:30
Jose Lorenzo Rodriguez
db6dd18f86 Fixing case where it was possible to pass array data to FormAuthenticate
fields
2013-04-24 22:33:24 +02:00
ADmad
3db632732c Avoid unnecessary overhead if user record already available from session. 2013-04-23 01:35:04 +05:30
ADmad
06a5c509c0 Merge branch 'master' into 2.4 2013-04-21 19:15:55 +05:30
mark_story
efd86a498a Do type checks when looking for models in Controller::$uses.
This solves issues with models not being added when $uses = true.

Fixes #3774
2013-04-19 12:20:46 -04:00
mark_story
3fc627c5f8 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Controller/Component/AuthComponent.php
	lib/Cake/Error/ErrorHandler.php
	lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php
	lib/Cake/View/Helper/HtmlHelper.php
2013-03-30 22:12:27 -04:00