ndm2
7d74818d9a
Fix ControllerTestCase::testAction()
incompatibility with App.base
.
...
When using array URLs with `testAction()`, the generated URL possibly
contains the configured `App.base` path, which needs to be stripped when
set on the request object, as otherwise routes cannot be matched
correctly.
When passing the URL as an option to the `CakeRequest` constructor, the
it will be set as-is, unlike when the URL is being generated by
`CakeRequest::_url()`, which grabs the URL from the environment, and
strips the possible base path.
2017-04-13 14:15:32 +02:00
Mark Story
0a378021a0
Merge pull request #10482 from cakephp/issue-10232
...
Fix CakeSocket not being able to connect to TLS1.2 only servers
2017-04-06 15:35:45 -04:00
mark_story
fa68c93c2d
Fix failing test.
...
This test merges config funny.
2017-04-06 10:08:17 -04:00
mark_story
5685c031e2
Disable autocomplete on CSRF/Security token fields.
...
New versions of Safari will overwrite these fields when a user uses the
back button. If one-time CSRF tokens are in use the request will be
blackholed.
Refs #10486
2017-04-05 13:02:17 -04:00
mark_story
7dbc71df8c
Conditionally define TLS constants & add test for new types.
...
Only map the new TLS constants if they exist.
2017-04-04 22:59:05 -04:00
mark_story
0b6c23d04f
Update schema reflection for postgres.
...
Use the schema reflection query from 3.x to provide access to the serial
column attributes. These attributes give a more reliable way to access
primary key data than comparing the primary key of the model. The old
approach failed when schema was generated and concrete model's were
missing.
Refs #10356
2017-03-26 22:23:41 -04:00
Sebastien Barre
02a946b17b
Merge branch '2.x' of https://github.com/cakephp/cakephp into duplicate_primary
2017-03-25 09:28:11 -04:00
chinpei215
3b75bd2dea
Fix risky tests
...
- Fix CakeTestCase::run() to restore original output buffering level
- Fix an undefined variable warning in missing_controller.ctp
- Fix ViewTest (backport of 92bd86274b64c31ef6034caa74bb168be041b5e0)
- Fix ThemeViewTest
2017-03-25 20:24:31 +09:00
chinpei215
70926fbb7f
Fix XML output of HelpFormatter
...
Backport from #10339
2017-03-25 17:58:21 +09:00
chinpei215
31a1837c1d
Merge branch '2.x' into 2.next
...
Conflicts:
lib/Cake/Test/Case/View/Helper/FlashHelperTest.php
lib/Cake/VERSION.txt
lib/Cake/View/Helper/FlashHelper.php
2017-03-25 17:12:28 +09:00
Mark Story
83e5ae522e
Merge pull request #10378 from mvdriel/make-error-class-in-formhelper-configurable
...
Make error class of div in FormHelper::input configurable
2017-03-17 22:48:50 -04:00
mark_story
ccc9006620
Unset the active user data on logout.
...
When using stateless authentication the current user should be cleared
after logout to maintain consistency with session based authentication.
Refs #10422
2017-03-16 11:31:20 -04:00
mark_story
c5e31e590d
Revise test case based on feedback in #10418
...
Try and change the test around to trigger the issue. I'm still not able
to reproduce the issue.
2017-03-15 21:33:19 -04:00
mark_story
9dbeeaa1fa
Add test for #10418
...
Show that find(list) does not drop keys with values = 0.
Refs #10418
2017-03-15 15:58:54 -04:00
Sebastien Barre
3ad91204b9
Merge branch '2.x' of https://github.com/cakephp/cakephp into duplicate_primary
2017-03-14 11:11:14 -04:00
mark_story
c3f88c350e
Add default value generation for all integer types.
...
This resolves the bigint issue raised by @chinpei in 10347 and adds
default values for the new small & tiny integer types.
2017-03-11 21:46:14 -05:00
mark_story
b6372d63d9
Rename (small|tiny)int to (small|tiny)integer
...
Make the new types consistent with the biginteger.
2017-03-11 21:41:22 -05:00
Sebastien Barre
1ebdc61fdc
clean up assertions now that we are dropping the fixture early
2017-03-09 23:11:17 -05:00
mark_story
e698891d09
Hash::filter() should not exclude 0.0
...
Refs #10385
2017-03-09 21:29:44 -05:00
Mark van Driel
c8aefeb495
Cs fixes
2017-03-08 14:16:08 +01:00
Mark van Driel
708e960968
Fixed tests
2017-03-08 13:43:40 +01:00
Mark van Driel
4728586365
Make error class of div in FormHelper::input configurable
2017-03-08 13:15:00 +01:00
Sebastien Barre
a0e023d3a9
fix coding standard, skip Postgres
2017-03-06 15:58:03 -05:00
Sebastien Barre
58078e77e1
more tinyint smallint tests in MySQL
2017-03-06 10:42:23 -05:00
Sebastien Barre
4fc8f7d919
fix test for UnsignedFixture
2017-03-06 00:21:11 -05:00
Sebastien Barre
15a33eee06
update more tests, DatatypeFixture
2017-03-05 22:38:08 -05:00
Sebastien Barre
3849df0f2f
fix duplicate primary keys for tables without models
2017-03-05 21:47:00 -05:00
Sebastien Barre
38101995b4
introduce new tinyint, smallint types for smaller storage requirements
2017-03-05 12:25:14 -05:00
Sebastien Barre
216ae0ec0c
fix coding standard
2017-03-04 00:56:57 -05:00
Sebastien Barre
d01f3e8aed
allow data sources to provide smaller integers based on storage requirements
2017-03-04 00:08:27 -05:00
Mark Story
8d0e1fadf7
Merge pull request #10113 from bancer/request-url-to-array
...
implemented Router::reverseToArray()
2017-03-02 23:07:40 -05:00
kanonji
3978f87c58
Stringify values to avoid trap of in_array() type juggling
2017-02-28 03:33:50 +09:00
Mark Story
beff1176b0
Merge pull request #10213 from cakephp/issue-10196
...
Allow false/true to be read as keys in Hash::get().
2017-02-20 11:54:17 -05:00
mark_story
34158407b2
Exit early if SMTP connection fails.
...
If the SMTP connection is disconnected (read() returns false) we should
exit early and not wait for the read timeout. This has the added benefit
of making the mocks much simpler.
Refs #10221
2017-02-13 22:37:44 -05:00
mark_story
3f10a0227a
Allow false/true to be read as keys in Hash::get().
...
While these are not values within the documented types, there exist use
cases in CakeSession that necessitate these to be supported types.
Refs #10196
2017-02-13 21:50:51 -05:00
chinpei215
e18029064c
Split tests of buildStatement()
2017-02-05 21:27:06 +09:00
chinpei215
abd7a257fe
Fix mysql test
2017-02-03 21:13:51 +09:00
chinpei215
923b73a7ba
Add support for having/lock options
2017-02-03 17:51:22 +09:00
chinpei215
7944f512ad
Fix ModelTaskTest for tests passing
2017-01-30 03:22:50 +09:00
Mischa ter Smitten
6818268a27
New Validation::(min|max)ByteLength() addition
2017-01-30 03:22:48 +09:00
Val Bancer
0bf49966db
fixed unit test
2017-01-26 22:39:38 +01:00
Val Bancer
e0b0da86bf
fixed unit tests
2017-01-26 22:21:09 +01:00
Val Bancer
ebde8fdfb5
implemented Router::reverseToArray()
2017-01-26 21:52:26 +01:00
Cory Thompson
e1fac3bf5b
Fix whitespace
2017-01-24 21:51:54 +11:00
Cory Thompson
55324c0b2a
Allow SQL json selects without defining table name
2017-01-24 20:54:07 +11:00
Cory Thompson
990d0a962f
Allow database JSON operations in conditions
2017-01-24 19:33:12 +11:00
Cory Thompson
82a64a3729
Merge remote-tracking branch 'doublemap/exclude-column-trailing-hyphen' into ticket-8872
2017-01-24 19:25:24 +11:00
mark_story
273a8a2d7d
Add support for the parseHuge option.
...
Sometimes people need to load huge XML files. Add an option to enable
people to enable this flag.
Refs #10031
2017-01-13 21:26:54 -05:00
Mark Story
d40b39f18b
Merge pull request #9970 from cakephp/issue-9962
...
Fix query string parsing on requestAction()
2017-01-06 13:47:42 -05:00
chinpei215
94d9bcd674
Fix FlashHelper::render() cannot render default
messages
...
Fixes #9910
2017-01-05 19:00:52 +09:00
mark_story
304117d228
Fix query string parsing on requestAction()
...
This also fixes a long standing oddity around string URLs that include
a query string where the query string data would be duplicated.
Refs #9962
2017-01-04 22:34:19 -05:00
mark_story
1a8f2202c0
Merge branch '2.x' into 2.next
2017-01-03 11:01:04 -05:00
Shunsuke Takahashi
6f5b16b31f
Allow the prepend the addCrumb method
2016-12-21 16:34:35 +09:00
mark_story
53bcc1550f
Fix PHPCS error.
2016-12-13 22:50:07 -05:00
mark_story
4c3e9356ba
Merge branch '2.next' of github.com:cakephp/cakephp into 2.next
2016-12-13 22:48:57 -05:00
mark_story
837741db66
Merge branch '2.x' into 2.next
2016-12-13 22:48:44 -05:00
mark_story
99af4bba83
Merge branch 'domingues-2x' into 2.x
...
Refs #9870
2016-12-13 22:48:12 -05:00
mark_story
3c44ddd10b
Add tests for #9870
2016-12-13 22:47:57 -05:00
Mark Story
4a4c83c3e9
Merge pull request #9859 from cakephp/debugger-encoding
...
2.x - Debugger encoding
2016-12-13 19:26:52 -05:00
mark_story
ee7739a3bf
Try another approach to get the same error in all php versions.
2016-12-13 00:46:13 -05:00
mark_story
69afeb08af
Skip error encoding test in PHP5.3
...
Index errors work funny in PHP5.3, which makes testing them not work
like other versions of PHP.
2016-12-12 21:28:20 -05:00
mark_story
edfda47cf4
Fix missing HTML encoding in Debugger
...
Fix missing HTML encoding when error messages contain HTML. This can
happen when user data is used as an offset in an array in an unchecked
way.
Thanks to Teppei Fukuda for reporting this issue via the responsible
security disclosure process.
2016-12-10 08:47:13 -05:00
Mark Story
420336f536
Merge pull request #9843 from cakephp/php71
...
Add PHP7.1 to test matrix.
2016-12-07 21:40:54 -05:00
mark_story
12cdc247ac
Fix PHPCS errors.
2016-12-07 00:38:55 -05:00
mark_story
0a2a400ea4
Fix type error tests to work in PHP5 & PHP7.1
...
Catch the TypeErrors that are raised and make the match the PHP5
behavior of a converted error.
2016-12-06 21:21:52 -05:00
Mark Story
9e6e08704e
Merge pull request #9838 from cakephp/issue-9779
...
Fix CookieComponent erroring on corrupted data.
2016-12-05 16:44:24 -05:00
mark_story
e3221b1c38
Fix errors in php7.1
...
* The constructor of errors has changed in PHP 7.1
* mcrypt is no longer available in PHP 7.1 by default.
2016-12-05 16:14:33 -05:00
chinpei215
26731b93bf
Use ternary operator
2016-12-04 21:55:29 +09:00
chinpei215
b7481096c8
Fix redirectUrl issue when loginRedirect is empty
...
Fixes #9819
2016-12-04 20:06:24 +09:00
mark_story
934bb00b36
Add tests showing recent changes fix #9784
2016-12-03 14:14:57 -05:00
mark_story
27f951fb41
Don't emit errors when operating on corrupted cookie data.
...
When deleting from corrupted cookie data, there shouldn't be any errors.
Refs #9779
2016-12-03 14:10:47 -05:00
chinpei215
74c2ded872
Fix directory traversal of .ctp files
2016-11-27 18:14:44 +09:00
mark_story
bbb87b3e87
Use null instead of false for failure.
...
null is better to indicate that a thing doesn't exist.
2016-11-26 10:38:28 -05:00
Mark Story
ba9f62a7a0
Merge pull request #9747 from tersmitten/cache-does-not-expose-configured-engines
...
Expose Cache engines
2016-11-26 10:16:20 -05:00
mark_story
e057b5572c
Fix PHPCS.
2016-11-21 20:51:12 -05:00
mark_story
71b7d6211b
Fix AclNode constructor.
...
It should forward the settings from ClassRegistry::init() so that
aliases can be customized as needed.
Refs #9766
2016-11-19 22:30:18 -04:00
mark_story
66363e6bea
Add tests for #9766
...
I'm not able to reproduce incorrect aliases coming out of ClassRegistry.
As reported.
2016-11-19 10:02:09 -04:00
Mischa ter Smitten
e71afa225e
Merge remote-tracking branch 'upstream/2.x' into make-it-possible-to-configure-cachemethodhashalgo-in-dbosource
2016-11-14 16:26:48 +01:00
Mischa ter Smitten
936b9924b3
Add tests for overridden cacheMethodFilter
2016-11-14 12:51:57 +01:00
Mischa ter Smitten
1952d2ee17
Add tests for cacheMethodFilter
2016-11-14 11:44:35 +01:00
Mischa ter Smitten
5947c2346b
Fix failing test
2016-11-14 10:53:33 +01:00
Mischa ter Smitten
7ffb5c3600
Add tests for cacheMethodHasher
2016-11-14 10:00:47 +01:00
Mischa ter Smitten
94572ae384
Do not use deprecated assertIsA
2016-11-11 21:41:23 +01:00
Mischa ter Smitten
175503fafa
Expose engines
...
By implementing the `engine` method just like in version 3
2016-11-11 13:42:22 +01:00
Val Bancer
467ee851bf
some refactoring to fix failed shell dispatcher tests
2016-11-08 10:03:46 +01:00
mark_story
3837f40394
Autodetect content-types for email attachments (2.x)
...
This ports the safe parts of #9619 and updates the tests. Because
existing tests had to change and I was concerned about changing people's
email messages in a bugfix release I'm targetting 2.next with this
change.
2016-11-06 21:49:15 -05:00
mark_story
c0150f62ed
Merge branch '2.x' into 2.next
2016-11-06 21:42:31 -05:00
mark_story
9d94487b23
Fix PHPCS
...
Refs MATES-9698
2016-11-04 09:31:05 -04:00
Rodrigo Pérez
20da4484de
refs #backport-paginate-multiple-queries Backporting cakephp 3.3 feature to paginate multiple queries
2016-11-04 11:10:28 +00:00
mark_story
6a201696dd
Fix HttpSocket emitting errors when nameless cookies are encountered.
...
Refs #9698
2016-11-03 19:07:25 -04:00
xhs345
e1c5ef9e7a
Add clear option to Flash Message
...
To give user the option to disable Stacking of messages and being consistent with 3.x
2016-10-30 20:39:00 -07:00
Val Bancer
744b455de1
fixed configuration of 'enabled' setting in components inside a
...
component
2016-10-28 22:14:20 +02:00
xhs345
924d382bb3
Fix tests
2016-10-28 09:10:01 -07:00
xhs345
c59fb85da8
Add support for stacking Flash messages
...
See Issue #7830
2016-10-28 09:10:01 -07:00
mark_story
135a24e0f1
Merge branch '2.x' into 2.next
2016-10-28 00:29:46 -04:00
mark_story
c935bed8f6
Fix PHPCS
2016-10-21 18:35:05 -04:00
mark_story
816801902e
Allow '' to be a valid key for Hash, and Session
...
By removing a bunch of empty() guards we can make '' behave like all the
other key names. This does change the existing behavior/tests around ''
key, but I think that is ok given the need to manipulate ''.
Refs #9632
2016-10-21 10:54:39 -04:00
chinpei215
3102d89313
Fix a test for PHP5.3
2016-10-16 22:40:27 +09:00
chinpei215
739664d6c7
Add more tests
2016-10-16 22:28:28 +09:00
chinpei215
d7ae1c92e7
Backport test cases and make sure those pass
2016-10-16 22:04:24 +09:00
mark_story
ecd270d04b
Tweak/Add doc blocks.
2016-10-09 11:05:35 -04:00
David Maicher
a932bce3de
[Bugfix] use Model::$cacheQueries as default for ->query(...)
2016-10-09 13:43:27 +02:00
Ashley Pinner
5f22fae1da
Adding Base64 support to the HtmlHelper::image() function
...
Requested by cakephp/cakephp#9560
2016-10-06 09:01:15 +01:00
José Lorenzo Rodríguez
9425234b87
Merge pull request #9550 from cakephp/issue-9526
...
Fix enum column length detection.
2016-10-06 09:29:25 +02:00
Andrej Griniuk
2d6e85ed14
validate table name before generating schema file
2016-10-03 00:23:05 +08:00
mark_story
e41ccdb701
Fix enum column length detection.
...
Use simpler code to calculate the length of fields. Include more tests
for DboSource as there weren't any before.
Refs #9526
2016-09-30 22:25:25 -04:00
Mischa ter Smitten
197c2f4e60
Make use of assertAttributeEquals
2016-09-22 21:30:18 +02:00
Mischa ter Smitten
4c9f1cc154
_lastAction() should also work with named parameters in the url
2016-09-20 15:07:36 +02:00
mark_story
ad5130cd31
Merge branch '2.next' into 2.x
2016-09-18 22:22:56 -04:00
mark_story
4f70bdb3b8
The _lastAction property should not double include the base path.
...
FormHelper should not run URLs through Router twice when determining the
the form's lastAction attribute. However, because we're using the helper
method (see #9414 ) we do need to HTML decode the URL before using it in
form token generation.
Refs #9455
2016-09-13 22:21:01 -04:00
mark_story
dc2fa498ef
PHPCS.
2016-09-12 23:19:08 -04:00
mark_story
9d1fbb95b3
Allow datasource access in constructors of mocked models.
...
When mock objects are created from models that access their datasource
in the constructor, an exception would be raised for the missing default
datasource. By changing how configuration data is handled in the mock
creation we can avoid this issue and not reopen #4867
Refs #8225
2016-09-12 22:15:55 -04:00
Val Bancer
98cd278c02
improved performance of insertMulti() in Mysql
2016-09-05 21:28:07 +02:00
mark_story
e8d63725d8
Merge branch '2.x' into 2.next
2016-09-04 23:54:22 -04:00
mark_story
2ffde69d5b
Skip test that always fails on PHP5.3
2016-08-29 21:56:30 -04:00
mark_story
d1cfe203c4
Fix PHPCS error.
2016-08-29 21:53:47 -04:00
Mark Story
51963ab8fc
Merge pull request #9349 from cakephp/2.x-sort-locale
...
2.x sort locale backport
2016-08-26 11:13:21 -04:00
Mark Sch
ee319baec1
Backport skip
2016-08-26 16:15:39 +02:00
mscherer
03df288e78
Re-add spacing.
2016-08-26 14:45:59 +02:00
mscherer
dab4b85596
Backport Hash::sort() support for type locale.
2016-08-26 14:32:21 +02:00
ndm2
87d86aaed9
Fix/tighten Folder::inPath()
checks.
...
The current checks are way too relaxed, and are more like testing
for a substring, which makes it easy for invalid paths to slip
trough, for example `/foo/var/www` is falsely tested to reside in
`/var/www`.
Passing an empty path never worked properly, it was triggering a
warning, didn't worked on Windows, and the behavior that the current
top level directory would be assumed for empty paths wasn't
documented.
Similar is true for relative paths. While they did match at one point,
this was incorrect behavior, and matching actual path fragments seems
out of scope for this method.
This change makes the `$path` argument required, requires it to be an
absolute path, and throws an exception in case a non-absolute path is
being passed.
2016-08-26 13:45:45 +02:00
Mark van Driel
e3b0aca95e
Removed bug fix for Helper::_confirm to keep the code compatible
2016-08-21 17:09:43 +02:00
Mark van Driel
34afc377ec
Added support for confirm (message) option to submit in FormHelper
2016-08-20 12:51:13 +02:00
José Lorenzo Rodríguez
3937a4f02e
Merge pull request #9255 from cakephp/issue-9229-restore
...
Restore header() behavior inadvertantely removed.
2016-08-15 09:51:10 +02:00
mark_story
3e16f8911d
Add tests covering basic use of <> in deleteAll()
...
Refs #9253
2016-08-13 22:48:02 -04:00
mark_story
bc73e928b6
Restore header() behavior inadvertantely removed.
...
In eaa2bbbcae
I changed the behavior to
now use the TitleCased name as I didn't understand the intended behavior
or how apache was working in the reporter's specific case.
Refs #9229
2016-08-11 21:54:24 -04:00
Marc Würth
f2638b3e38
Remove superfluous "Class" from doc blocks
2016-08-10 12:22:09 +02:00
mark_story
61b3fbd605
Merge branch '2.x' into 2.next
2016-08-09 22:12:26 -04:00
mark_story
eaa2bbbcae
Merge branch 'auth-header' into 2.x
...
Refs #9229
2016-08-09 22:07:46 -04:00
mark_story
20a2af8c16
Fix casing issues with Authorization header.
...
We need to check the upper case versions of headers in $_SERVER.
Also fix lint issues.
2016-08-09 22:06:49 -04:00
nojimage
e71d83c612
TestShell passes the 'directive' option to PHPUnit correctly
2016-08-08 20:09:37 +09:00
Sebastien Barre
345375b6b6
add test
2016-08-07 23:08:55 -04:00
Juan I. Benavides
93db51cf10
Avoiding circular object reference in SmptTransport
...
This fixes a memory leak while sending multiple emails.
Fixes : #9198
2016-08-01 13:09:45 -05:00
Mark van Driel
5caac5f340
Prevent unnecessary joins / complex conditions in delete
2016-07-27 16:31:57 +02:00
Andrej Griniuk
147693618c
refs #9174 fix CakeSchema compare when changing field length to the default one
2016-07-26 23:39:09 +03:00
Mark van Driel
d6e45131ad
Prevent unnecessary joins / complex conditions in delete
2016-07-25 17:15:18 +02:00
Mark Story
b50c06423d
Merge pull request #9115 from biesbjerg/ticket-7488
...
Fire Controller.shutdown and Dispatcher.afterDispatch events when exceptions are thrown
2016-07-19 22:49:02 -04:00
Mark Story
876b508797
Merge pull request #9108 from cakephp/issue-9106
...
Don't split strings headers that lack a ':'.
2016-07-15 22:20:13 -04:00
Kim Biesbjerg
38cad279d1
Updated test method name and description
2016-07-14 04:57:25 +02:00
Kim Biesbjerg
c77b628841
Dispatch Controller.shutdown instead of calling afterFilter directly. Updated test
2016-07-14 04:51:49 +02:00
Kim Biesbjerg
a05639a30e
Don't save buffered output to var since it is not used
2016-07-14 00:20:33 +02:00
Kim Biesbjerg
5a63ee4e3e
Added tests to prove that Dispatcher.afterDispatch event is dispatched by exception renderer on error response
2016-07-14 00:17:02 +02:00
mark_story
4e1b601ed8
Don't split strings headers that lack a ':'.
...
Refs #9106
2016-07-12 22:46:47 -04:00
Philippe Saint-Just
b0e5e39e45
Added test case
2016-07-10 09:57:24 +01:00
Kim Biesbjerg
1d7a4da903
Fixed wrong assertion
2016-07-07 09:24:33 +02:00
Kim Biesbjerg
0ea315b2e0
Add assertion to prove session is not started on stateless login
2016-07-07 08:58:51 +02:00
Kim Biesbjerg
c63de8d9f5
Added test to prove stateless login sets user
2016-07-06 12:34:23 +02:00
mark_story
234f732d6d
Attempt to get tests passing on travis.
...
Also attempt to get stickler to ignore the 2.x branch.
2016-07-01 17:52:02 -04:00
mark_story
d816ea6e16
Add test showing that niceShort translates month names.
...
Refs #8968
2016-07-01 17:51:23 -04:00
nojimage
57e0a97483
refs #8654 FormHelper cleanup unlockFields key
2016-06-28 22:01:06 -04:00