Commit graph

3064 commits

Author SHA1 Message Date
mark_story
9fd1a51a52 Merge branch 'master' into 2.6 2014-07-10 14:39:32 -04:00
mark_story
a098d96c94 Remove flaky test that was of questionable value. 2014-07-10 14:39:20 -04:00
euromark
ac0053d660 Added a shorthand stackTrace() method 2014-07-10 01:49:28 +02:00
mark_story
3a70d9c033 Merge branch 'master' into 2.6 2014-07-09 10:17:05 -04:00
chinpei215
0c1fc36b14 Fix an infinite recursion caused by missing plugin
When a MissingPluginException has caught when rendering an exception,
we should disable the plugin as needed to prevent an infinite recursion.
2014-07-09 15:55:41 +09:00
Schlaefer
1e961a8aac increases time window in CSRF token expiry tests to 2 seconds
travis-cs failed with 1 second margin
2014-07-06 13:54:24 +02:00
Schlaefer
9fa7afa354 fixes #3887 CSRF reusable token expires 2014-07-06 10:39:00 +02:00
José Lorenzo Rodríguez
396725dc8c Merge pull request #3880 from markstory/incorrect-validation
Fix issues with Validation::inList() and SecurityComponent
2014-07-05 14:41:15 +02:00
ADmad
1eccec02e4 Merge pull request #3872 from CostaC/response-sharable-fix
Fix for CakeResponse::sharable() header to include private caches
2014-07-04 10:32:51 +05:30
mark_story
3936cce4b8 Disallow hexadecimal input with inList.
Instead of turning on/off strict mode based on the user supplied input,
cast everything to strings and always use a strict check. This avoids
the potential issue of a bad user using hexadecimal when they should not
be allowed to do so. Thanks to 'Kurita Takashi' for pointing this out.
2014-07-03 22:10:49 -04:00
Costa Caruso
4f559f5cc9 Fixed failing test for CakeResponse::sharable + spacing 2014-07-03 15:03:48 -04:00
ADmad
e410501791 Fix CS errors. 2014-07-03 23:13:55 +05:30
mark_story
2bcd817367 Merge branch 'master' into 2.6 2014-07-03 11:13:06 -04:00
euromark
974ca851c2 Correct doc blocks according to cs guidelines.
Remove superfluous empty lines.
2014-07-03 15:36:42 +02:00
mark_story
b1610c145e Merge branch 'master' into 2.6 2014-07-02 23:39:16 -04:00
mark_story
adcf9ab723 Fix failing test.
CakeEmail now has a default validation pattern.

Refs #3742
2014-06-30 13:29:39 -04:00
mark_story
dc34d80f6f Relax email validation rules even more.
While filter_var() allows a number of email addresses that
Validation::email() does not, it misses out of email address that
contain IDN host names, and unicode mailboxes. Both of these are
generally deliverable, and should be permitted. filter_var() also fails
on local mailboxes like `root@localhost` which is useful in the context
of cron jobs.

Fixes #3742
2014-06-30 10:42:37 -04:00
mark_story
30952f2b64 Merge branch '2.6' of github.com:cakephp/cakephp into 2.6 2014-06-29 22:57:59 -04:00
Derek Perkins
b1a3ab9e64 Added unit test for CakeRequest::setInput
Don't use mocks as the tests weren't really testing anything when mocks
were involved.

Refs #3764
2014-06-29 22:55:38 -04:00
ADmad
607200fa7b Add pluralization rule for "stadia".
Refs #3830
2014-06-29 14:51:23 +05:30
Mark Story
187272c06a Merge pull request #3824 from NickBeeuwsaert/element_events
Added view type getter and ensured element render events would get the proper type
2014-06-28 06:21:46 -04:00
Nick Beeuwsaert
733a610bf7 More coding standard fixes 2014-06-27 18:03:29 +00:00
Nick Beeuwsaert
6623a8a7f4 Adhering to CakePHP coding standards 2014-06-27 17:28:43 +00:00
Nick Beeuwsaert
f9aa954562 Changed Event names back, added view type getter
Changed `Element.beforeRender` and `Element.afterRender` back to
`View.beforeRender` and `View.afterRender` Also added a getter for
`View::_currentType`.
Added more tests to make sure that things were getting reset right
And also that View::render and View::element events were working
As expected

Changed Event names back, added view type getter

Changed `Element.beforeRender` and `Element.afterRender` back to
`View.beforeRender` and `View.afterRender` Also added a getter and
setter for `View::_currentType`.
Added more tests to make sure that things were getting reset right
And also that View::render and View::element events were working
As expected
2014-06-27 15:40:12 +00:00
Bryan Crowe
a1ae31e554 Fix identifier typos 2014-06-26 23:06:08 -04:00
Renan Gonçalves
1a89a3cb9d Exiting with 1 when Exception::getCode() returns non-integer values.
From php.net/exception.getcode
> Returns the exception code as integer in Exception but possibly as other type in Exception descendants (for example as string in PDOException).
2014-06-26 13:26:20 +02:00
Nick Beeuwsaert
7cef19fe96 Changed View::element() to have an appropriately named event
And also made it so when the event fires the subjects type is
`View::TYPE_ELEMENT`. Wrote some tests which I hope are done right I
don't really know the bes way to write a test for a event listener
2014-06-25 22:08:59 -05:00
mark_story
a2673d8bf0 Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/Core/App.php
2014-06-25 09:22:10 -04:00
mark_story
a40fa5cae9 Add test for #3754 2014-06-25 09:19:24 -04:00
José Lorenzo Rodríguez
3df972faa2 Merge pull request #3782 from cakephp/issue-3779
Whitelist more URL-y characters in digest parsing.
2014-06-24 21:56:40 +02:00
euromark
26fe1265ab Mark App::pluginPath as deprecated and don't use it anymore. 2014-06-24 11:52:29 +02:00
mark_story
b4bcd74e60 Whitelist more URL-y characters in digest parsing.
Android clients include a full URL instead of just the URI. Also handle
situations where URLencoded bytes and document fragments are used.

Refs #3779
2014-06-23 14:39:35 -04:00
ADmad
9a1a965b1c Update isAbsolute() to recognize stream wrapper paths.
This has the benefit that the realpath() method is not applied to a
registered stream wrapper in the constructor of the Folder class.
Using the realpath() method will break the stream.

Thank "davalb" for the original patch.
2014-06-22 13:43:14 +05:30
mark_story
497ecd3f80 Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/VERSION.txt
2014-06-19 21:41:02 -04:00
mark_story
9136f63874 Fix autoLinkEmail() not working when emails are adjacent to HTML.
When an email address is adjacent to HTML it should be autolinked
correctly.

Refs #3656
2014-06-16 21:48:30 -04:00
mark_story
74d8e9ea40 Convert test to use a dataprovider instead of multiple calls.
Dataproviders are generally a bit easier to work with in the future.
2014-06-16 21:46:34 -04:00
mark_story
fa19c34580 Fix Hash::extract() not matching 1/0 to true/false.
Historically [prop=1] has matched prop=true as well. This restores that
and also fixes [prop=0] not finding falsey values.

This makes the typing less strict in Hash::extract() but I don't think
it is unreasonable given PHP's type juggling.

Refs #3288
2014-06-12 11:30:48 -04:00
José Lorenzo Rodríguez
91224b0ec1 Merge pull request #3653 from markstory/2.6-html-css
Add once option to css().
2014-06-06 09:55:06 +02:00
José Lorenzo Rodríguez
932bf47481 Merge pull request #3604 from Haititi/2.6-save-atomic
2.6 add 'atomic' option to "save()" API - delivery
2014-06-05 13:55:52 +02:00
mark_story
758599e6f4 Add once option to css().
The default value is false for backwards compatibility. In 3.0, the
default will be made consistent with script().

Refs #1973
Refs #3628
2014-06-04 22:15:56 -04:00
Haithem BEN GHORBAL
31615ce415 add 'atomic' option to "save()" API
This commit adds a transaction context to 'save()' API in order to rollback
possible modifications done in some 'Model.beforeSave' listener callback.
This will allow cakephp 2.x to behave like 3.0 .
It uses try/catch to better handle transaction.
Previous save() API is renamed to protected _doSave() method.
A new save() method is created for transaction handling.
'atomic' option is disabled for internal 'save()' call.
2014-06-03 09:37:17 +02:00
mark_story
92eeef8ae0 Merge branch 'master' into 2.6 2014-06-02 22:57:25 -04:00
mark_story
55672b6df3 Merge branch 'router-stars' from Hikkijp
Refs #3582, #3581
2014-06-02 22:38:27 -04:00
mark_story
4362f7bf8b Add tests for CakeRoute::match() and trailing * routes.
Add tests for /pages/** routes, and fix coding standards errors.

Refs #3581
2014-06-02 22:37:37 -04:00
mark_story
975e4c3af0 Allow username of 0 in basic authentication.
Refs #3624
2014-06-02 22:02:28 -04:00
mark_story
d1e4dfac47 Add tests for #3624
The username of '0' should be accepted by FormAuthenticate.

Refs #3624
2014-06-02 21:58:50 -04:00
Stefan Dickmann
91907b5c6c correct docblock
invalid certificate domain
2014-06-01 13:23:47 +02:00
mark_story
15f63e9c81 Removing peer verification failure test.
Since we are not running a domain with an invalid certificate relying on
someone else to do that is quite unreliable.
2014-05-31 21:51:03 -04:00
ADmad
543066f34a Set default sort direction to 'asc'. 2014-05-30 19:43:09 +05:30
Mark Story
136f026f77 Merge pull request #3548 from dogmatic69/patch-3
Allow getting params the same way data() works
2014-05-29 21:49:09 -04:00