Commit graph

3742 commits

Author SHA1 Message Date
nojimage
57e0a97483 refs #8654 FormHelper cleanup unlockFields key 2016-06-28 22:01:06 -04:00
mark_story
432eb9c432 Merge branch '2.x' into 2.next 2016-06-27 21:47:47 -04:00
mark_story
f28c21c7a7 Stop testing against SSL ciphers that emit warnings.
Testing that SSLv3 still works is causing test failures.
2016-06-27 21:47:37 -04:00
Mark Story
55e9638044 Merge pull request #8844 from icyrizard/add_http_patch_content_type_check
Add HTTP patch Content-Type check
2016-05-27 15:41:18 +02:00
Aloïs Thévenot
b737e9f732 #8844 Add test 2016-05-27 12:50:23 +00:00
mark_story
e78af35af7 Only clear the unlocked fields on end().
Doing this work on end() allows fields to be unlocked before the form is
created which can be helpful.

Refs #8880
2016-05-25 23:04:53 +02:00
Mark Story
b15560ea0c Merge pull request #8880 from nojimage/form-unlockfields-2x
Reset FormHelper::$_unlockFields for 2.x
2016-05-25 22:59:25 +02:00
mark_story
d5d46e21bd Fix indentation. 2016-05-22 16:39:49 -04:00
Mark Story
1a7e8c51e7 Merge pull request #8848 from xhs345/2.x
Add attribute 'fieldset' to Form->radio
2016-05-22 16:38:39 -04:00
nojimage
850305a384 fixes reset FormHelper::$_unlockFields 2016-05-21 13:33:20 +09:00
xhs345
eeefa03546 Updated Radio and Inputs form helper
Also added UnitTest for radio fieldset class-name
2016-05-19 17:28:47 -07:00
Mark Story
0fd3ad9b76 Merge pull request #8851 from MarkusBauer/v2.x/SqliteTestEnhancements
Sqlite testcase enhancements
2016-05-18 22:01:33 -04:00
Markus Bauer
2227e01990 Fixing Sqlite's handling of datetime/timestamp columns with current_timestamp default set 2016-05-19 00:21:43 +02:00
Markus Bauer
058809275c Enable nested transactions before trying to test them 2016-05-18 23:46:51 +02:00
Markus Bauer
f75ebf8cb9 Make Sqlite Testcases compatible with Windows / NTFS file systems 2016-05-18 23:46:10 +02:00
Steampilot
723ed96fd6 Added sorting by modified time in Folder util 2016-05-12 16:28:04 +02:00
Juan Basso
fa6e74ca22
Improved apc calls
Instead of calling the call_user_func_array it does the call directly. It is a little bit more verbose, but performs better.
2016-05-07 14:26:09 -04:00
Juan Basso
4a61f7f23c
Supporting APCu on PHP 7 2016-05-07 03:46:21 -04:00
xhs345
4d65091d0c Updated tests 2016-05-03 15:39:37 -07:00
mark_story
12c6fd4e22 Merge branch '2.x' into 2.next 2016-05-02 21:58:41 -04:00
mark_story
0912867b49 Minor formatting clean up.
Refs #8754
2016-05-02 21:58:20 -04:00
schrolli
e0682fc8a1 added testcases for time and datetime-fields
both have set their length field and should be displayed as text-inputs
2016-05-02 17:13:22 +02:00
Mark Sch
32cb25465f Make CS tests pass. 2016-05-02 10:42:42 +02:00
mark_story
ade9d8a811 Restore backwards compatibility with old 2.x in FormHelper.
Restore the behavior of the string 'action' option to its former glory.
While we've deprecated this it needs to continue working as it did
before.

Refs #8628
2016-05-01 22:21:23 -04:00
Philippe Saint-Just
c2f028ab49 Fix spacing 2016-04-30 13:13:14 -04:00
Philippe Saint-Just
cd07850337 Merge branch 'backport-8741-8690' into 2.x 2016-04-30 13:11:34 -04:00
mark_story
af953700b8 Fix short array usage.
Refs FIVESMX-8723
2016-04-29 09:28:05 -04:00
mark_story
cf55767fa0 Backport range parsing resiliancy fixes from 3.x
Refs #8723
2016-04-28 22:27:37 -04:00
mark_story
9536a10d6d Make schema import plugin friendly.
The changes in #8694 pointed out that schema importing doesn't play nice
with plugins. This corrects that.
2016-04-23 16:18:15 -04:00
mark_story
3a75e8aa72 Use import options when going through execute()
The `records` and `schema` options should work when using execute().
Previously they were not working. Furthermore, the records option did
a non-sensical thing where it both set import=>records and generated
static records from the live table. The `records` option now enables
the generation of static data from a live table, as I think this is
a more common scenario.

Refs #8693
2016-04-23 16:15:54 -04:00
Mark Story
be35880b2f Merge pull request #8692 from garethellis36/dont-override-shell-loggers
Don't override already-configured loggers
2016-04-22 16:05:03 -04:00
Gareth Ellis
bfb6ebb049 PHPCS fixes 2016-04-22 19:21:47 +01:00
Gareth Ellis
bc3a1fb6c5 Makes ShellTest::testShellLoggersDoNotGetOverridden actually useful 2016-04-22 19:18:29 +01:00
Gareth Ellis
153f04a976 Changes behaviour of _useLogger so that already-configured loggers are not overridden 2016-04-22 13:56:26 +01:00
chinpei215
1826b4cb08 Add DboSource::flushQueryCache() 2016-04-19 00:01:06 +09:00
mark_story
8b5023282e Randomly generate a salt when the salt is '' or null.
To prevent an issue where any value is accepted as a password when '' is
provided as the hashed password.

Refs #8650
2016-04-15 21:49:17 -04:00
mark_story
f451efa511 Attempt to fix tests in 2.x
Relying on tv.eurosport.com having a bad peer name is pretty fragile.
However, we can more easily rely on their cert coming from a CA we no
longer trust.
2016-04-14 15:28:34 -04:00
chinpei215
5006cc396a Add a test case to make sure of backward compatibility 2016-04-11 00:43:35 +09:00
mscherer
e84ff5e0d5 Fix doc block param types. 2016-04-08 15:12:48 +02:00
mscherer
657b1a1029 Fix doc block param types. 2016-04-08 15:02:03 +02:00
mscherer
bae4a11e5e Rename test file. 2016-04-08 14:40:30 +02:00
mscherer
dda9e83ab6 Refactor Object to CakeObject for future PHP7 comp. 2016-04-08 14:33:26 +02:00
mark_story
79db545b69 Fix PHP 5.4 syntax. 2016-04-02 21:45:02 -04:00
mark_story
1333cc4b3e Merge branch 'postlink-token' into 2.x
Fix inline postLink() calls corrupting the containing form's tampering
token.

Refs #8387
2016-04-01 23:08:41 -04:00
mark_story
c551faad46 Add tests for changes in #8387
Add tests covering the new behavior.
2016-04-01 23:08:31 -04:00
mark_story
84fc9498b5 Allow N11 exchange numbers as valid.
The previous code and commit (fa3d4a0bb5)
were incorrect about invalid exchange numbers as 1-800-211-4511 is
a real phone number.

I've also removed a duplicate alternation pattern.

Refs #8567
2016-03-31 22:38:16 -04:00
mark_story
1926d40d40 Fix possibility for spoofed files to pass validation.
Use `is_uploaded_file` to prevent crafty requests that contain bogus
files from getting through. A testing stub class was necessary to avoid
making significant changes to the test suite.
2016-03-28 22:10:36 -04:00
Gareth Ellis
a6702b70d4 Extracts error trace in ErrorHandler to a helper function to allow customization 2016-03-23 19:05:23 +00:00
mark_story
f57f038c09 Fix for PHP 5.3 2016-03-16 21:17:42 -04:00
mark_story
745f3a33e6 Fix boolean values in select widgets.
Boolean `false` should be treated like `0` when comparing option values.

Refs #8468
2016-03-15 22:59:03 -04:00
mark_story
af046fc7d6 Merge branch 'request-ip' into 2.x 2016-03-13 23:00:47 -04:00
mark_story
fef3090717 Fix incorrectly inheriting permissions.
When child inherits from a deny parent the '*' permission should reflect
permissions on all nodes not just the leaf node. Previously once a node
with all permissions set to inherit was found, the check would pass.
Instead it should cascade to the parent nodes and look for explicit
allow/deny.

Refs #8450
2016-03-11 23:18:50 -05:00
mark_story
48af49ddde Don't trust CLIENT_IP
The client_ip header can easily be forged. In 'safe' modes we should
only trust the remote_addr which comes from the sapi. Remove support for
http_clientaddress as I can't seem to find where this ever came from in
PHP on the http specs.
2016-03-10 22:04:13 -05:00
Mark Story
18b0334890 Merge pull request #8384 from garas/mailtransport-log-subject
Email log missing Subject and To headers when using MailTransport
2016-03-02 21:29:13 -05:00
mark_story
3ad68db5eb Tweak fix from #8359
This fixes a regression introduced in that change that we didn't
previously have tests for. The issue fixed in #8359 was related to
PHP7.0, whereas PHP5 didn't have an issue. Now both versions will work
the same.
2016-03-02 12:30:48 -05:00
Edgaras Janušauskas
2386a86adc Include Subject and To in email log when using MailTransport 2016-03-01 22:21:14 +02:00
mark_story
3ed321dff4 Handle negative numbers in Redis correctly.
Update number sniff to handle negative numbers. We need to do number
sniffing so we can maintain compatbility between write() and
increment()/decrement().

Refs #8364
2016-02-27 00:07:58 -05:00
Mark Story
eae7a8926b Merge pull request #8345 from cakephp/issue-8330
Fix parsing empty header values.
2016-02-26 23:01:59 -05:00
Mark Story
31b3f39b67 Merge pull request #8310 from cakephp/secure-random
2.x - Secure random
2016-02-25 22:05:08 -05:00
mark_story
1a170e1eec Fix parsing empty header values.
Replace the complex and somewhat unfixable regexp based parser for
a parser that handles each line individually. Normalize multi-line
headers to replace multiple spaces with a single one. Section 4.2 of the
HTTP1.1 standard states

> Any LWS that occurs between field-content MAY be replaced with
> a single SP before interpreting the field value or forwarding the
> message downstream.

This makes me somewhat confident that we can safely normalize
multi-line HTTP header values.

Refs #8330
2016-02-24 22:25:58 -05:00
mark_story
9c0da41858 Skip test on PHP7 as the warning is not consistent. 2016-02-23 20:54:16 -05:00
Mark Story
ff6cdd4b73 Merge pull request #8279 from cakephp/issue-8114
Fix inherited permissions when checking the '*' permission.
2016-02-22 14:48:58 -05:00
mark_story
7df99fff1f Backport Security::randomBytes() to 2.x
I decided to leave the warning in. People who can't upgrade their
applications should at least be aware of the risks they are taking.

I'm flexible if people are strongly opposed to a warning, but I feel
that these kinds of warnings can be supressed in production if they
really are in a jam and don't care.

Refs #8282
2016-02-22 00:14:44 -05:00
mark_story
4389c79442 Update tests.
The old tests were relying on the fixed inherit bug. Instead check
a specific permission which will result in a deny.

Refs #8114
2016-02-18 21:24:52 -05:00
mark_story
8f3df8b13e Make tests not fail when extensions are installed
If the extensions are installed but memcached/redis are not running
errors should not be emitted.
2016-02-18 21:14:55 -05:00
mark_story
b2509ea13d Fix inherited permissions when checking the '*' permission.
When checking inherited permissions for '*' also copy inherited
permissions onto the inherited list. By copying the inherited values, we
get the union of explit allow and inherited permissions, which if all
things go well will match the permission key list.

Refs #8114
2016-02-16 22:30:19 -05:00
Mark Story
68082fad02 Merge pull request #8207 from CakeDC/feature/uuid
Add support for Postgres native uuid datatype
2016-02-16 21:53:08 -05:00
Chris Hallgren
bf22e84d65 CS fixes 2016-02-15 20:44:27 -06:00
Chris Hallgren
849abab6a4 Fixing test case 2016-02-15 19:34:05 -06:00
Chris Hallgren
0c183b9b8e Read content type in a more compatible way.
Not all webservers set CONTENT_TYPE. The built-in PHP webserver for
example sets HTTP_CONTENT_TYPE instead. Add a public method to the
request object to smooth over this difference.

Refs #6051, #8267
2016-02-15 19:31:24 -06:00
Marc Würth
b5655d63ff Remove lighthouse references 2016-02-10 12:27:34 +01:00
mark_story
e4b939bba0 Backport fix for Validation::uploadedFile to 2.x
Don't fail validation when the keys are not the expected order.

Refs #8201
2016-02-08 22:37:25 -05:00
mark_story
c0d897b45c Merge branch '2.x' into 2.8 2016-02-06 20:55:08 -05:00
Mark Story
41a12e9aa2 Merge pull request #8067 from cakephp/issue-7906
Make the session cacheLimiter a configuration option.
2016-02-06 20:30:48 -05:00
Edgaras Janušauskas
f389231058 Improve ExtractTask when CakePHP installed via Composer 2016-02-03 14:52:15 +02:00
Jorge M. González Martín
3ca3ffeeee fix phpcs 2016-01-29 08:56:36 +00:00
mark_story
3b5a71df37 Merge branch '2.7' into 2.8 2016-01-28 21:51:59 -05:00
mark_story
fc57dee72f Fix error in PHP 5.3 2016-01-28 21:50:56 -05:00
Mark Story
aa449b194d Merge pull request #8125 from CakeDC/issue/7978
Add support for NOT IN in Model::find() conditions.

Refs #7978 fixing regex to take in account IN operator
2016-01-28 21:48:04 -05:00
Yevgeny Tomenko
70c4e40532 Fix value check and formatting. 2016-01-28 23:36:07 +03:00
Pedro Fernandes Steimbruch
bf8e6ce576 Refs #7978 fixing code standard 2016-01-28 17:55:19 -02:00
Pedro Fernandes Steimbruch
eaeb7cea9e Refs #7978 fixing regex to take in account IN operator 2016-01-28 17:34:08 -02:00
Yevgeny Tomenko
e83a532af0 Fixed array syntax. 2016-01-28 22:12:24 +03:00
Yevgeny Tomenko
06853a137a Merge remote-tracking branch 'remotes/origin/2.8' into feature/uuid 2016-01-28 22:08:10 +03:00
Yevgeny Tomenko
209cdd71a9 code formatting fixes 2016-01-28 21:54:49 +03:00
Yevgeny Tomenko
296f698db3 Added test cases covering native uuid field usage for Postgres class 2016-01-28 21:13:33 +03:00
mark_story
3e67685c7c Merge branch '2.7' into 2.8 2016-01-21 21:46:51 -05:00
mark_story
4b8d628a2e Backport SecurityComponent fixes from #8071 to 2.x
If the request manages to have data set outside of post/put we should
still validate the request body. This expands SecurityComponent to cover
PATCH and DELETE methods, as well as request methods that should be
safe, but somehow end up not safe.
2016-01-20 21:34:58 -05:00
mark_story
91109c33b2 Merge branch '2.7' into 2.8 2016-01-19 21:15:08 -05:00
José Lorenzo Rodríguez
835fc9ce01 More CS fixes 2016-01-19 13:52:16 -04:30
José Lorenzo Rodríguez
2962b387d7 Fixed CS error 2016-01-19 11:17:06 -04:30
mark_story
57f620fc22 Make the session cacheLimiter a configuration option.
Instead of hardcoding to must-revalidate, developers can use a more
suitable option if they do not have to support IE8.

Refs #7096
2016-01-18 22:18:38 -05:00
Jose Lorenzo Rodriguez
bd53ef01a6 Better method overriding emulation for GET 2016-01-18 20:34:32 -04:30
Seth Tanner
e75858d342 refs #7929 update uuid test 2016-01-15 12:15:59 -08:00
mark_story
d773644232 Merge branch '2.7' into 2.8 2016-01-12 22:14:16 -05:00
Mischa ter Smitten
8d472a5d78 Memcached can not connect using a socket
Fixes #8018
2016-01-12 21:01:14 +01:00
Mark Scherer
3fb752a577 Fix CS 2016-01-07 11:09:48 +01:00
Mark Scherer
b1f1003ebe Allow 3.x backport of url=>false in 2.x 2016-01-07 10:48:20 +01:00
Mark Scherer
55ca2ddabd Fix CS. 2016-01-04 15:53:48 +01:00
Mark Scherer
cd59ab9c40 Fix tests 2016-01-04 15:08:31 +01:00