Commit graph

3486 commits

Author SHA1 Message Date
Mark Story
d05727b6df Merge pull request #7265 from mattmemmesheimer/issue-7048
Issue 7048
2015-08-20 22:32:39 -04:00
ndm2
8fe953548c Fix path traversal check for Windows based systems
On Windows based systems, both, backward as well as forward
slashes are supported as path separators, thus checking for `DS`
only, would allow to slip in `../` fragments.

refs #5905, cad57dcc28
2015-08-19 16:47:53 +02:00
mattmemmesheimer
d4467f9acf Fixing unit tests. 2015-08-18 22:14:10 -05:00
James Tancock
5b92c900e6 Missing test fix ModelIntegration 2015-08-18 13:32:16 +01:00
James Tancock
fdb41e01bb Alter Model::exists() to return false with no table 2015-08-18 13:07:30 +01:00
James Tancock
2f7cc052d2 Typo in tests docblock 2015-08-17 13:15:35 +01:00
James Tancock
fd198ce0fa Edits to tests to cover the changes to Model::exists 2015-08-17 12:19:02 +01:00
Marc Würth
f3e590acfb Annotate test coverage 2015-08-11 16:36:09 +02:00
mark_story
07c2047984 Merge branch '2.7' of github.com:cakephp/cakephp into 2.7 2015-08-06 21:43:40 -04:00
mark_story
b7c9ac913d Backport fixes for comparison() and range() to 2.x
These fixes were released as a security update for 3.x, they also belong
in 2.x
2015-08-06 21:36:39 -04:00
mark_story
056f24a774 Forbid direct prefix access with mixed casing.
Changing the casing up should not allow prefix method access.
2015-08-05 23:05:30 -04:00
mark_story
9f20330d17 Fix fatal error on null subject.
Refs #7176
2015-08-05 22:20:39 -04:00
Mark Story
58bede76d1 Merge pull request #7103 from ravage84/2.7-fixture-import-record-aware
Make fixture import from table aware of records found
2015-08-03 16:01:35 -04:00
mark_story
a73fc25657 Fix incorrectly parsed mo file context.
The context from mo files should be parsed correctly.

Refs #7118
2015-07-30 22:28:55 -04:00
José Lorenzo Rodríguez
355eb1859c Merge pull request #7106 from cakephp/issue-7098
Consistently remove plugin names in object collections.
2015-07-28 15:58:41 +02:00
mark_story
58ea40e32c Don't stop reading when only a '0' has been read.
Make tests simpler by using onConsecutiveCalls() instead of trying to
maintain mock method indexes.

Refs #7121
2015-07-27 22:40:27 -04:00
Mark Scherer
a239324a0d use constant PHP_SAPI 2015-07-26 15:35:03 +02:00
Mark Story
de4b44a37b Merge pull request #7077 from dereuromark/2.7-static
Replacing self with static due to PHP5.3+. Following #7040.
2015-07-23 22:27:37 -04:00
mark_story
418dcfd7f8 Consistently remove plugin names in object collections.
We were sometimes removing plugin prefixes (set, and some subclass
methods). But many other methods were missing the pluginSplit() feature.
This change makes all of the methods in ObjectCollection strip plugin
prefixes, which increases consistency across the framework.

Refs #7098
2015-07-23 21:46:21 -04:00
Marc Würth
b412b405f9 Make fixture import from table aware of records found 2015-07-23 18:03:42 +02:00
antograssiot
94b2ea29a6 enable colors for windows ConEmu user
backport of #7090
2015-07-23 05:49:15 +02:00
Mark Story
e19f621314 Merge pull request #7086 from cakephp/issue-7069
Fix issues saveMany & saveAssociated with boolean values.
2015-07-22 22:01:39 -04:00
Yoshiyuki Kinjo
e25be3a47e Add failing test for FormHelper::input
FormHelper::input does not respect 'value' option when form is of date/time type.

Signed-off-by: mark_story <mark@mark-story.com>

Backport fixes from #7082 to 2.7
2015-07-22 21:59:44 -04:00
mark_story
c6e5026767 Fix issues saveMany & saveAssociated with boolean values.
For non-atomic, save operations that include models with boolean fields.
The first false value would cause the save to abort. This regression was
introduced in #6947. Instead of checking the data from save() we should
be boolean casting save() to capture the success/failure.

Refs #7069
2015-07-22 00:41:10 -04:00
mark_story
e4b2428735 Fix PHPCS errors. 2015-07-21 16:28:17 -04:00
Mark Scherer
52e79987a2 Replacing self with static due to PHP5.3+. Following #7040. 2015-07-21 10:22:53 +02:00
mark_story
bd23fdeebf Simplify code and reduce test redundancy.
We don't need the additional parameter, and some of the tests weren't
covering unique scenarios.

Refs #7040
2015-07-20 22:16:50 -04:00
Chris Valliere
7b2d7ad748 Test Case for Hash::maxDimensions
Added test case for Hash::maxDimensions using the example array in pull request #7040.
2015-07-20 22:07:58 -04:00
mark_story
9b313f86e4 Add tests for #7034
These tests ensure that redirect() is never called which ensures the
Location header is never set. Ajax requests when no loginElement is
defined should get an empty response with a 403 status code.
2015-07-16 23:00:20 -04:00
Mark Scherer
d98e7d8d27 Fix tests. 2015-07-13 08:37:11 +02:00
Mark Scherer
2eea245491 Backport utf fix for CakeText::tokenize(). 2015-07-13 08:23:05 +02:00
mark_story
47378427e3 Merge branch '2.6' into 2.7 2015-07-11 21:25:26 -04:00
Marc Würth
4a131bdcbf Capitalize Windows, the OS 2015-07-09 15:54:03 +02:00
Mark Story
97656d8edb Merge pull request #6965 from dy-dx/backport-csv-mapping
Don't map text/plain to csv. Backport from 3.0. Refs #1696
2015-07-07 22:07:02 -04:00
mark_story
7613e720e7 Fix PHPCS errors. 2015-07-07 22:06:47 -04:00
mark_story
59a18e7709 Merge branch '2.6' into 2.7 2015-07-07 22:05:56 -04:00
Chris Kim
94fbc6e5f2 Don't map text/plain to csv. Backport from 3.0. Refs #1696
Jquery sets accepts header similar to "text/plain, */*; q=0.01" by
default for xhr requests. Due to this RequestHandler used to set
extension to csv thereby causing View class to look for views under
non-existent csv folders.
2015-07-07 15:19:45 -04:00
mark_story
4102961cb5 Add tests for #6879
I wasn't able to reproduce the issue the reporter had, but we have more
robust tests now.
2015-07-06 22:43:52 -04:00
hiromi2424
deb62c8887 #6935 Fix deep saving for hasMany could not handle validation errors correctly 2015-07-04 06:10:58 +00:00
mark_story
cbd45f702d Make FlashComponent/FlashHelper more backwards compatible.
Merge branch 'issue-6874' into 2.7.

Make AuthComponent use FlashComponent, and make FlashHelper more
compatible with SessionHelper::setFlash().
2015-06-26 22:05:32 -04:00
mark_story
97c5463387 Fix failing tests.
FlashHelper uses `Message` not flash now. This is more backwards
compatible with 2.x

Refs #6874
2015-06-26 22:04:00 -04:00
mark_story
e651d15df5 Add tests for less greedy field parsing in SQLite.
Refs #6887
2015-06-25 22:21:38 -04:00
mark_story
ae2ea1ea6c Merge branch '2.6' into 2.7 2015-06-25 21:50:47 -04:00
Highstrike
a9d77d26f0 fix failing tests
fixing...
2015-06-25 13:40:50 +03:00
mark_story
2f616a9e0c Fix greedy regex operators in Postgres driver.
`*` is greedy in regex, and needs to be escaped so that SQL operators
don't cause invalid SQL conditions to be created.

Refs #6877
2015-06-24 23:39:26 -04:00
Mark Scherer
1c56c723f5 Backport param() access. 2015-06-25 00:52:33 +02:00
Highstrike
58983f717a 2.7.0-RC Auth doesn't use the new Flash component
Changed 'Flash.' to 'Message.' and also provided backwards compatibility
in FlashHelper->render
2015-06-24 14:06:35 +03:00
Mark Story
0841c04351 Merge pull request #6853 from cakephp/2.6-template
Cleanup method calls.
2015-06-22 10:53:32 -04:00
Mark Scherer
fc57e43a5b Adjust tests. 2015-06-21 12:13:09 +02:00
Humberto Pereira
77150eb6f6 fixed tests cases to print html 2015-06-20 22:19:08 -04:00