Commit graph

753 commits

Author SHA1 Message Date
Mark Sch
b096005561 Fix CS 2016-08-21 20:31:45 +02: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
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
Sebastien Barre
acc32f5c58 Work around Apache handling the Authorization: header differently 2016-08-07 19:50:23 -04:00
Juan I. Benavides
60bd98a593 Consistency with other methods: Type declaration of CakeEmail parameter. 2016-08-02 02:30:43 -05:00
Juan I. Benavides
d37f88b20e Documentation and declaration of object type in method's parameter
This should make pass the phpcs check. #9199
2016-08-01 16:46:25 -05: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_story
4e1b601ed8 Don't split strings headers that lack a ':'.
Refs #9106
2016-07-12 22:46:47 -04:00
kolorafa
449e5fc9cf Can't override CakeEmail class and use deliver
When using TemplateEmail::deliver it always create new instance of CakeEmail, I assume it should create my extended "TemplateEmail" class insted.

PHP >5.3 compatible
2016-06-13 18:02:26 +02:00
mark_story
7055e82eab Add missing uses() call.
Refs #8929
2016-06-02 22:04:50 -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
Richard Torenvliet
e31ce0d58f Add the HTTP Patch to the Content-Type check mechanism
Currently when a request is of type 'patch' it is ignored. This commit makes
sure that the Content-Type is checked when a patch request is provided.
2016-05-18 14:54:52 +02:00
mark_story
39b4cbebb3 Port PHP7 fixes to 2.x
Port the fixes @ADmad did in 8f150dc5 to 2.x so those builds start to
pass once again.
2016-05-08 15:36:28 -04:00
mark_story
cf55767fa0 Backport range parsing resiliancy fixes from 3.x
Refs #8723
2016-04-28 22:27:37 -04:00
Juan Basso
718a7479e2 Fixed doc formatting on CakeResponse::cookie
Fixed doc to show properly in the documentation. This change was already applied on master.
2016-04-10 23:34:01 -04: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
Edgaras Janušauskas
2386a86adc Include Subject and To in email log when using MailTransport 2016-03-01 22:21:14 +02: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
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
Chris Hallgren
bf22e84d65 CS fixes 2016-02-15 20:44:27 -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
Edgaras Janušauskas
6e54a7391c Use more specific datatypes in PHPDoc 2016-01-28 23:10:51 +02:00
Edgaras Janušauskas
fde1d08b43 Fix PHPDoc @return by replacing $this to self 2016-01-28 23:10:42 +02:00
José Lorenzo Rodríguez
3ee9f97826 Trying to fix tests 2016-01-19 11:03:07 -04:30
José Lorenzo Rodríguez
dc83669e9b using the right superglobal 2016-01-19 10:43:12 -04:30
José Lorenzo Rodríguez
93ba85b8b8 Fixed failing test 2016-01-19 08:37:36 -04:30
Jose Lorenzo Rodriguez
bd53ef01a6 Better method overriding emulation for GET 2016-01-18 20:34:32 -04:30
Mark Scherer
d2153ac1eb Fix typo in doc block. 2015-12-19 20:07:13 +01:00
Mark Scherer
479eec4148 Fix doc block instead. 2015-12-19 18:25:30 +01:00
Mark Scherer
4136857278 Fix return value in SmtpTransport 2015-12-19 15:57:53 +01:00
Mark Story
4faf31e60a Merge pull request #7836 from RichieB2B/fix-proxy-auth-via-ssl
Fix proxy authentication when SSL is used
2015-12-15 21:56:40 -05:00
Richard van den Berg
ac50b609ac Added space 2015-12-11 15:01:05 +01:00
Richard van den Berg
e315fb6688 Fix proxy authentication when SSL is used 2015-12-11 14:44:46 +01:00
Richard van den Berg
4a4728b44d Fix SSL via proxy 2015-12-11 10:28:53 +01:00
Qing Wu
48dd778bd0 Fixed issue #7579 on the 2.7 branch 2015-12-02 10:24:16 +11:00
mark_story
079d15d54f Handle enhanced config in a more graceful way.
HttpSocket further munges the host into a nested array. This config
value should be preferred over the top level host config.

Refs #7675
2015-11-11 22:51:17 -05:00
Richard van den Berg
f8e7634131 Use hostname of request instead of hostname of proxy for SNI 2015-11-10 10:54:36 +01:00
ADmad
b9dc89acff Update docblock 2015-10-30 09:24:22 +05:30
mark_story
fea6fd7d30 Fix incorrect doc tag. 2015-10-16 22:09:12 -04:00
mark_story
e0d2c45d9a Fix PHPCS error. 2015-10-12 22:20:15 -04:00
mark_story
3a4facbf8d Remove allowSelfSigned() method.
This method is no longer needed as the low level socket understands the
`ssl_*` options now.

Refs #7496
2015-10-12 21:58:55 -04:00
mark_story
cc3531d288 Move SSL context options into CakeSocket.
Having all the options consolidated in one places enables all the SSL
context options to be used in the SmtpTransport instead of just allowing
self_signed as proposed in #7496
2015-10-12 21:56:20 -04:00
Ian den Hartog
5dfb780970 Change names 2015-10-06 10:10:34 +02:00
Ian den Hartog
bb7e7850ae Add test for Self-signed certificates 2015-10-02 16:17:26 +02:00
Ian den Hartog
5c722c6665 Fix peer verification 2015-10-02 10:18:07 +02:00
Ian den Hartog
e2c303b2b9 Add support for Self Signed certificates with smtp 2015-10-01 23:02:43 +02:00