Commit graph

18492 commits

Author SHA1 Message Date
Marc Würth
adc450d18b Remove outdated statement about log auto config 2016-03-15 19:33:14 +01:00
mark_story
22a2e93c4b Update version number to 2.8.2 2016-03-13 23:01:17 -04:00
mark_story
af046fc7d6 Merge branch 'request-ip' into 2.x 2016-03-13 23:00:47 -04:00
Mark Story
562d954eea Merge pull request #8453 from cakephp/issue-8450
Fix incorrectly inheriting permissions.
2016-03-12 21:11:12 -05: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
Mark Story
63de5ca4ea Merge pull request #8359 from phlyper/patch-1
verify exists index 0 in $ref
2016-03-02 12:27:49 -05:00
Mark Story
bafcba3c71 Merge pull request #8383 from xhs345/patch-1
Updated deprecated doc for flash method
2016-03-01 18:19:39 -05:00
Alex
862397325d fixed typo 2016-03-01 12:41:29 -08:00
Edgaras Janušauskas
2386a86adc Include Subject and To in email log when using MailTransport 2016-03-01 22:21:14 +02:00
Alex
e5e4317217 Updated deprecated doc for flash method 2016-03-01 12:17:39 -08:00
mark_story
78f199f8a0 Update version number to 2.8.1 2016-02-27 22:31:18 -05:00
José Lorenzo Rodríguez
da15674a2c Merge pull request #8365 from cakephp/issue-8364
2.x - Handle negative numbers in Redis correctly.
2016-02-27 16:42:08 +01: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
phlyper
7b9ff1c11b verify exists index 0 in $ref
exemple

i have to get the referrer url from any page if exists

```
class AppController extends Controller {
......
    public function beforeRender() {
        parent::beforeRender();
        $this->params['referer'] = $this->referer(null, true);
    }
..........
}
```
2016-02-26 22:39:48 +01:00
mark_story
1709f54e38 Update documentation for Model::_readDataSource()
Update sample code to generate unique keys based on association
conditions as well. Because association conditions are not part of the
'query' they need to be handled separately.

Refs #8346
2016-02-26 12:39:29 -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
fc714a6451 Merge pull request #8321 from ravage84/patch-2
Replace Set by Hash
2016-02-23 12:42:49 -05:00
Marc Würth
1258739411 Replace Set by Hash
References to the deprecated Set class don't make much sense.
2016-02-23 13:09:03 +01: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
7e5f56362f Deprecate bad methods.
These methods are bad and should feel bad.
2016-02-22 00:16:15 -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
ee2d222b85 Correct API docs for find().
Fixes #8308
2016-02-21 22:42:24 -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
7a5907057a Ensure keys are strings before accessing them.
Some userland datasources (namely an oracle driver) manage to get arrays
into $stack.

Refs #8281
2016-02-18 21:03:57 -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
Mark Story
337b95a4f5 Merge pull request #8268 from challgren/issue-8267+6051
Read content type in a more compatible way.
2016-02-15 23:32:24 -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
Jorge M. González Martín
19fc6adbb3 Merge pull request #1 from roll4life/feature/uuid
refs #8027 combine if statements
2016-02-11 12:19:27 +00:00
Seth Tanner
c05835d85d refs #8027 combine if statements 2016-02-11 01:49:34 +00:00
Mark Story
ddc71efb54 Merge pull request #8227 from ravage84/2.x-requireauth-deprecation
Deprecate SecurityComponent::requireAuth & SecurityComponent::require…
2016-02-10 10:34:56 -05:00
Marc Würth
780b836d57 Deprecate SecurityComponent::requireAuth & SecurityComponent::requireAuth()
Backport of https://github.com/cakephp/cakephp/pull/8191
2016-02-10 13:37:10 +01:00
Mark S
86d7a80e50 Merge pull request #8226 from ravage84/2.x-lighthouse
Remove lighthouseapp references
2016-02-10 12:35:24 +01:00
Marc Würth
b5655d63ff Remove lighthouse references 2016-02-10 12:27:34 +01:00
Mark S
6413610e76 Merge pull request #8223 from garas/2.8-AuthComponent-user
Use mixed return type for AuthComponent::user()
2016-02-09 23:54:03 +01:00
Edgaras Janušauskas
5b10e3cac2 Use mixed return type for AuthComponent::user() 2016-02-09 23:04:26 +02:00
ADmad
8b15cf1455 Merge pull request #8209 from cakephp/issue-8201
Backport fix for Validation::uploadedFile to 2.x
2016-02-09 12:05:41 +05:30
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
e9f133121d Merge pull request #8208 from cakephp/2.x-tree
Fix bool check and also some doc blocks.
2016-02-08 21:18:02 -05:00
Mark Scherer
f1bea77d74 Fix bool check and also some doc blocks. 2016-02-09 01:18:43 +01:00
mark_story
80f18448b5 Update version number to 2.8.0 2016-02-06 20:59:33 -05:00