Commit graph

732 commits

Author SHA1 Message Date
Richard van den Berg
15c80f7c3d Move proxy code inside if (->connected) 2015-03-23 22:31:05 -04:00
Richard van den Berg
7704efdb28 Use feof() in while loop 2015-03-23 22:31:05 -04:00
Richard van den Berg
3995c70046 Strict === and space 2015-03-23 22:31:04 -04:00
Richard van den Berg
bb8e0ae835 Use enableCrypto() 2015-03-23 22:31:01 -04:00
Richard van den Berg
54a3f8724b Addapted quick hack from issue #2057 for 2.6.3 2015-03-23 22:31:01 -04:00
mark_story
0b916cedbb Merge branch 'master' into 2.7 2015-03-09 21:55:20 -04:00
mark_story
cad57dcc28 Use DS instead of checking both slash styles.
Refs #5905
2015-03-09 21:55:07 -04:00
Mark Story
43f16f38f0 Merge pull request #5905 from davidsteinsland/fix_file_response_dots
Fix file response dots
2015-03-09 21:54:02 -04:00
mark_story
b80a8947d7 Check line length to account for fence post.
When we have exactly 998 bytes CakeEmail should not emit an error.

Refs #5948
2015-02-24 21:52:34 -05:00
ADmad
2a57d9b65f Avoid reloading config file and recreating config instance. 2015-02-20 08:48:25 +05:30
Jan Dorsman
e3b5306521 Fixing issue #5764 2015-02-19 12:19:27 +05:30
David Steinsland
5fd7396e47 Fixed downloading of files with dots 2015-02-15 19:32:33 +01:00
mark_story
eb85a875c0 Merge branch 'master' into 2.7 2015-02-10 23:00:43 -05:00
James Watts
970cb81d03 Typo typo 2015-02-02 02:07:13 +01:00
Mark Story
35e0dc2bbd Merge pull request #5760 from cakephp/master
Merge master into 2.7
2015-01-27 20:48:15 -05:00
Richan Fongdasen
fd47d26f6b Keep the user agent list in alphabetical order 2015-01-21 22:50:46 +07:00
Richan Fongdasen
a7d604bca8 Add mobile agent for Blackberry Z10 and Blackberry Z30, fixes #5706 2015-01-21 13:47:03 +07:00
mark_story
3078a1eb52 Merge branch 'master' into 2.7
Conflicts:
	lib/Cake/VERSION.txt
2015-01-16 22:22:26 -05:00
Mark Scherer
2b1e487530 Correct CakeSocket docblocks. 2015-01-15 23:39:09 +01:00
mark_story
ac9a212d44 Merge branch 'master' into 2.7
Conflicts:
	lib/Cake/Utility/String.php
2015-01-11 15:25:18 -05:00
José Lorenzo Rodríguez
0a4141c78c Merge pull request #5614 from cakephp/issue-5595
Convert header_sent exception into a notice error.
2015-01-09 22:25:09 +01:00
mark_story
18f02bf5b3 Don't emit errors or trigger exceptions when headers have been sent.
After discussing it a bit, we've come to consensus that emitting errors
or throwing exceptions are both pretty disruptive and annoying to deal
with. Instead we'll revert to the previous 2.x behavior of doing
nothing.
2015-01-09 15:16:14 -05:00
antograssiot
c2f298a8b7 Replace our custom code fence with markdown standard fence 2015-01-09 13:47:25 +01:00
mark_story
a7aaa93131 Convert header_sent exception into a notice error.
Throwing an exception here, causes an infinite loop when handling fatal
errors, as the shutdown function sends headers automatically.

Refs #5595
2015-01-08 21:47:13 -05:00
euromark
52ecccb1a2 App::uses and usage replacements for String => CakeText. 2015-01-05 01:00:57 +01:00
mark_story
839ef73d43 Merge branch '2.6' into 2.7 2014-12-17 21:46:54 -05:00
mark_story
4d6611b328 Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/VERSION.txt
2014-12-17 21:38:32 -05:00
euromark
e1c128bb99 Consolidate with conditions sniff. 2014-12-09 03:17:35 +01:00
mark_story
1c913d29b6 Merge branch '2.6' into 2.7 2014-11-29 22:00:24 -05:00
mark_story
543f05e3d0 Merge branch 'master' into 2.6 2014-11-29 22:00:00 -05:00
Florian Krämer
e7f554cba7 Changing the direct access of super globals in Cake/Network/CakeRequest.php to use env() and fixed a typo. 2014-11-29 03:04:07 +01:00
Florian Krämer
43f7fcc735 Adding a few more ways to detect HTTP headers, extensions and the accept header. 2014-11-27 01:00:44 +01:00
Tsuyoshi Sadakata
1f4402cd4c check ob_get_level() before ob_flush() 2014-11-26 17:25:10 +09:00
mark_story
1e6d22b8cb Make the version option function as intended.
The version option is documented but does not work. While this 'breaks'
behavior, it also fixes what I think is a more important issue.

Refs #5234
2014-11-24 22:38:00 -05:00
Florian Krämer
4ff07b745a Adding a test for the new json and xml detectors that were added to the CakeRequest class. 2014-11-22 17:30:53 +01:00
Florian Krämer
83eb8ce7de Changes to Cake/Network/CakeRequest.php as discussed on Github for the detector code changes. Fixed the description of a few doc blocks, removed the use of getallheaders(), removed the failsafe (based on extension) for the xml and json detectors. 2014-11-22 12:55:22 +01:00
Florian Krämer
17e5d41e55 Restructuring the CakeRequest::is() code and related code a little. 2014-11-21 18:49:36 +01:00
Florian Krämer
3f5f8cbc15 phpcs fixes in Cake/Network/CakeRequest.php 2014-11-20 22:16:36 +01:00
Florian Krämer
728764c543 Adding a test for the refactored CakeRequest code. 2014-11-20 21:14:17 +01:00
Florian Krämer
88bfa70cad Refactoring the detector code for CakeRequest::is() and adding default detectors for JSON and XML. 2014-11-20 21:14:07 +01:00
Mark Story
5dab175aa9 Merge pull request #5196 from cakephp/issue-5140
Gracefully handle invalid chunks in HttpSocket
2014-11-18 21:58:41 -05:00
ndm2
bae556e73f Prevent zero only lines from being emptied 2014-11-18 17:26:31 +01:00
mark_story
8cbf975943 Gracefully handle invalid chunks in HttpSocket
When invalid chunks are detected we should assume the server is
incorrect and handle the remaining content as a single large chunk.

Refs #5140
2014-11-17 22:23:46 -05:00
mark_story
3095187952 Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/VERSION.txt
2014-11-10 19:38:31 -05:00
ndm2
f0b6657113 Make unsetting the email pattern work as expected.
When set to `null`, only `filter_var()` should be used. This is a
partial backport of #5111
2014-11-09 16:33:57 +01:00
mark_story
0e4fb9d648 Merge branch 'master' into 2.6 2014-11-07 15:13:46 -05:00
mark_story
6aaac6b7e2 Fix HttpSocket mishandling encoded URIs
The HTTP specs seem to indicate that the Location header should contain
an 'absoluteURI' which includes encoded data. In order to avoid
a regression with the issue fixed in b9ee4fc9f1
we'll continue to replace `%2F` and no longer decode the entire URI.

Fixes #5076
2014-11-05 22:18:48 -05:00
euromark
768f2c809c Correct doc block return types. 2014-11-05 13:03:27 +01:00
Marek Władysz
090e85a5a4 Make CakeResponse::file() accept ranges even when download option is false. 2014-10-25 19:49:56 +02:00
mark_story
af43bc1706 Merge branch 'master' into 2.6 2014-09-25 22:39:51 -04:00
euromark
af7916b1a7 Fix bug in CakeEmail::reset() 2014-09-24 14:02:18 +02:00
mark_story
cf45d3fab8 Merge branch 'master' into 2.6 2014-09-22 20:46:28 -04:00
euromark
4d1a65ede2 Add intl email test. 2014-09-16 10:14:00 +02:00
mark_story
734bb9223b Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/Core/App.php
	lib/Cake/VERSION.txt
2014-09-06 23:04:20 -04:00
Marc Würth
67ba9cb406 Update all @deprecated annotations
to adhere to the @deprecated <version> <description> format, where version and description are mandatory.
2014-09-02 17:03:22 +02:00
mark_story
7c316bbc56 Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/basics.php
2014-08-30 21:28:11 -04:00
mark_story
cd7438d33d Fix 0 index not being properly parsed for files. 2014-08-23 13:05:16 +02:00
Jeremy Harris
8f420d74fa HttpSocket: not overwriting auth header if it is set in request configuration 2014-08-21 11:24:10 -05:00
mark_story
cb45821c43 Fix reversed arguments in error message. 2014-08-08 23:29:29 -04:00
mark_story
9c3089796f Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/Model/Model.php
2014-08-08 23:28:06 -04:00
Mathew Foscarini
4957418a4b Added missing return statement.
PhpStorm is flagging this function as missing a return statement. Using a return statement (instead of the default) makes the intent of the source code clearer.
2014-08-05 08:39:19 -04:00
ADmad
713f430fc4 Merge branch 'master' into 2.6 2014-08-03 01:05:36 +05:30
Anthony GRASSIOT
aa42b80a4d a / an typo fixes fot API 2014-07-30 22:11:03 +02:00
mark_story
0b85c35635 Fix up code formatting and structure for #3998
* Fix the various PHPCS errors.
* Make the logic less complex.
2014-07-28 21:47:35 -04:00
Xinquan Zhu
e08b8148a5 throw CakeException instead, putting throws tag in the comment 2014-07-28 21:41:51 -04:00
Xinquan Zhu
809de69dcf replace whitespaces with TABs and only throw exception when Cake is in Debug mode 2014-07-28 21:41:51 -04:00
Xinquan Zhu
792c251890 throw an Exception when header is already been sent 2014-07-28 21:41:51 -04:00
ADmad
9e21d048ce Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/VERSION.txt
2014-07-27 12:29:39 +05:30
Mark Story
adf739b893 Merge pull request #4011 from ndm2/stmp-auth-reponse-evaluation-fix
Make SMTP auth reply code checks work properly.
2014-07-24 08:42:22 -04:00
Rachman Chavik
aad89444d1 Fix: Blackholed request when POSTing to a URL with space
Eg:

Actual Posted URL:
    /admin/settings/settings/prefix/Access%20Control
$_GET value:
    /admin/settings/settings/prefix/Access_Control

Since $unsetUrl differs, the $_GET value will get copied in to
CakeRequest::$query, causing CakeRequest::here() to return:

    /admin/settings/settings/prefix/Access%20Control?%2Fadmin%2Fsettings%2Fsettings%2Fprefix%2FAccess_Control=

This confuses SecurityComponent in the following line:

    f23d811ff5/lib/Cake/Controller/Component/SecurityComponent.php (L514)
2014-07-24 16:25:03 +07:00
mark_story
0d14bf7cc8 Update doc blocks.
There were a few trailing comments in #3706 that have now been
addressed.
2014-07-20 22:00:07 -04:00
Mark Story
7ef7ce2dbb Merge pull request #3706 from MelvinRoss/httpsocketheader
Add support for specifying protocol in Cakesocket/HttpSocket.  Add HEAD function to HttpSocket
2014-07-20 21:58:37 -04:00
mark_story
0dfce1abf3 Add . to the list of allowed characters.
This was missed when the email validation rules were relaxed in
dc34d80f6f.

Fixes #4027
2014-07-19 19:57:33 -04:00
ndm2
bf7d01ac66 Make SMTP auth reply code checks work properly. 2014-07-18 14:53:22 +02:00
Melvin Ross
0eaf650d9f Test for new HEAD function inside HttpSocket 2014-07-14 14:34:27 -05:00
mark_story
3a70d9c033 Merge branch 'master' into 2.6 2014-07-09 10:17:05 -04:00
ADmad
1eccec02e4 Merge pull request #3872 from CostaC/response-sharable-fix
Fix for CakeResponse::sharable() header to include private caches
2014-07-04 10:32:51 +05:30
Costa Caruso
8bfebd64fb Fix for failing test "Whitespace found at end of line" 2014-07-03 15:45:03 -04:00
Costa Caruso
4f559f5cc9 Fixed failing test for CakeResponse::sharable + spacing 2014-07-03 15:03:48 -04:00
mark_story
2bcd817367 Merge branch 'master' into 2.6 2014-07-03 11:13:06 -04:00
euromark
974ca851c2 Correct doc blocks according to cs guidelines.
Remove superfluous empty lines.
2014-07-03 15:36:42 +02:00
mark_story
b1610c145e Merge branch 'master' into 2.6 2014-07-02 23:39:16 -04:00
Costa Caruso
1164c0bcad Fix for CakeResponse::sharable() header to include private caches 2014-07-02 17:34:09 -04:00
mark_story
dc34d80f6f Relax email validation rules even more.
While filter_var() allows a number of email addresses that
Validation::email() does not, it misses out of email address that
contain IDN host names, and unicode mailboxes. Both of these are
generally deliverable, and should be permitted. filter_var() also fails
on local mailboxes like `root@localhost` which is useful in the context
of cron jobs.

Fixes #3742
2014-06-30 10:42:37 -04:00
mark_story
30952f2b64 Merge branch '2.6' of github.com:cakephp/cakephp into 2.6 2014-06-29 22:57:59 -04:00
Derek Perkins
6bf0b22195 Add setInput function to CakeRequest
Modify data originally from `php://input`. Useful for altering json/xml
data in middleware or DispatcherFilters before it gets to
RequestHandlerComponent or other controllers.
2014-06-29 22:55:29 -04:00
mark_story
a2673d8bf0 Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/Core/App.php
2014-06-25 09:22:10 -04:00
euromark
b3507b199a Update doc blocks regarding return $this 2014-06-25 00:06:51 +02:00
suzuki86
8f9589f7c8 Fix typo 2014-06-25 00:20:54 +09:00
Melvin Ross
ad4dbdcee5 Fix HttpSocket test to actually reset protocols for correct test. Modify HttpSocket so that Https with non-passed in protocol doesn't set it to tcp and fail test. 2014-06-12 09:37:03 -05:00
Melvin Ross
460cc29fff Remove unneeded comment out line that I just saw in compare view on GH 2014-06-12 08:51:35 -05:00
Melvin Ross
361531509e Fix coding standard violations 2014-06-12 08:47:40 -05:00
mark_story
8e14b2f807 Merge branch 'master' into 2.6 2014-06-11 23:05:59 -04:00
Melvin Ross
86923e3593 Modify CakeSocket and HttpSocket so that the "protocol" parameter can be used to specify which protocol to use for creating sockets. These are protcols in the php "[a-z]://" wrapper sense. I also modified the test for these two files respectively to accomodate these new changes.
Unrelated to this bug, I added a "head" function inside of HttpSocket to go along with the GET/POST/PUT/DELETE/PATCH combination that's already present. Came in handy for me for deciding if I wanted to hit a resource with HttpSocket or not.
2014-06-11 19:04:58 -05:00
ADmad
1d40f3e685 Fix API docblock CS errors. 2014-06-05 00:28:55 +05:30
mark_story
92eeef8ae0 Merge branch 'master' into 2.6 2014-06-02 22:57:25 -04:00
ADmad
3d9b2b80cb More API docblock fixes. 2014-06-01 03:06:05 +05:30
Mark Story
136f026f77 Merge pull request #3548 from dogmatic69/patch-3
Allow getting params the same way data() works
2014-05-29 21:49:09 -04:00
dogmatic69
bcdc530391 adding support to write values to param like can be done with data(), method returns $this as does ->data() when writing 2014-05-25 00:52:30 +01:00
dogmatic69
9dca564519 make the default return false so it matches previous use, improve tests for new method 2014-05-25 00:46:40 +01:00