Commit Graph

137 Commits

Author SHA1 Message Date
Dominik Schilling
9046c96d95 HTTP: Improve detection of valid IP addresses.
Merge of [37115] to the 4.3 branch.
Built from https://develop.svn.wordpress.org/branches/4.3@37117


git-svn-id: http://core.svn.wordpress.org/branches/4.3@37084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-30 15:51:47 +00:00
Dominik Schilling
224efaf1e0 HTTP: 0.1.2.3 is not a valid IP.
Merges [36435] to the 4.3 branch.
Built from https://develop.svn.wordpress.org/branches/4.3@36437


git-svn-id: http://core.svn.wordpress.org/branches/4.3@36404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-02 13:03:51 +00:00
Dion Hulse
7f29687a55 Revert [33845]
git-svn-id: http://core.svn.wordpress.org/branches/4.3@33847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-03 03:33:24 +00:00
Dion Hulse
f0706a0895 Term Splitting: Switch to a faster cron unschedule process to benefit sites with thousands of affected jobs. Fix the cron hook name in the failsafe rescheduler.
Merges [33727] to the 4.3 branch
Props Otto42, dd32, peterwilsoncc
Fixes #33423 for trunk

Built from https://develop.svn.wordpress.org/branches/4.3@33877


git-svn-id: http://core.svn.wordpress.org/branches/4.3@33845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-03 03:31:17 +00:00
Dion Hulse
7cfe2d293f Revert [33688] which removed all branches/4.3 files due to a sync script error.
git-svn-id: http://core.svn.wordpress.org/branches/4.3@33692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-24 22:14:43 +00:00
Weston Ruter
4e96fc9fd7 Widgets: Switch back to using array_key_exists() instead of isset() for widget instance existence check.
Reverts unnecessary change in [32602] since `array_key_exists()` does actually work with `ArrayIterator` objects.

Merges [33696] to the 4.3 branch.
See #32474.
Fixes #33442 for the 4.3 branch.

Built from https://develop.svn.wordpress.org/branches/4.3@33721


git-svn-id: http://core.svn.wordpress.org/branches/4.3@33688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-24 19:31:16 +00:00
Dion Hulse
0b648f198b Revert [33614] which removed all branches/4.3 files due to a sync script error.
git-svn-id: http://core.svn.wordpress.org/branches/4.3@33616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-19 13:24:10 +00:00
Dion Hulse
7f86f37642 Term Splitting: Fix a reversal of parameters to wp_schedule_single_event() introduced in [33621].
The existing invalid cron entries will not be purged automatically (as the 'timestamp' is never matched) so we do this ourselves.

Merges [33646] to the 4.3 branch.
Props mechter for noticing!
See #30261.
Fixes #33423 for the 4.3 branch.

Built from https://develop.svn.wordpress.org/branches/4.3@33647


git-svn-id: http://core.svn.wordpress.org/branches/4.3@33614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-19 11:37:14 +00:00
Scott Taylor
19a3aacc94 Add @static* annotations where they are missing.
Initialize all static vars that are not, most to `null`.

See #32444.

Built from https://develop.svn.wordpress.org/trunk@32650


git-svn-id: http://core.svn.wordpress.org/trunk@32620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-29 15:43:29 +00:00
Scott Taylor
053790537f Cleanup doc blocks in http.php.
In the few functions that used `$objFetchSite` instead of `$http`: use the `$http` naming, which is more civilized.

See #32444.

Built from https://develop.svn.wordpress.org/trunk@32599


git-svn-id: http://core.svn.wordpress.org/trunk@32569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-25 17:32:27 +00:00
Scott Taylor
a0df295f5c Improve various @param docs.
See #30224.

Built from https://develop.svn.wordpress.org/trunk@30674


git-svn-id: http://core.svn.wordpress.org/trunk@30664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 23:24:25 +00:00
Andrew Nacin
a6103b30f5 Better validation of the URL used in core HTTP requests.
Built from https://develop.svn.wordpress.org/trunk@30443


git-svn-id: http://core.svn.wordpress.org/trunk@30438 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-20 14:01:23 +00:00
John Blackbourn
e2ff1da654 Update the docs for wp_remote_retrieve_response_code(). See #28887.
Built from https://develop.svn.wordpress.org/trunk@29985


git-svn-id: http://core.svn.wordpress.org/trunk@29727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-21 21:13:18 +00:00
Mark Jaquith
e1f2b3b9e2 Use HTTPS URLs for trac.wordpress.org (and use core.trac.wordpress.org)
see #27115
Built from https://develop.svn.wordpress.org/trunk@29789


git-svn-id: http://core.svn.wordpress.org/trunk@29561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-29 13:37:16 +00:00
Drew Jaynes
61b8ba8461 Convert documentation for default arguments in WP_Http::request() to a hash notation.
Also update corresponding docs for functions that leverage its arguments.

See #28298.

Built from https://develop.svn.wordpress.org/trunk@29230


git-svn-id: http://core.svn.wordpress.org/trunk@29014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-18 22:01:15 +00:00
Scott Taylor
5e7ac8de94 Remove by-reference modifiers from arguments in wp_remote_retrieve_* functions.
Props jesin.
Fixes #27687.


Built from https://develop.svn.wordpress.org/trunk@28257


git-svn-id: http://core.svn.wordpress.org/trunk@28085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-05 18:46:15 +00:00
Sergey Biryukov
e85c40a3f7 Avoid an undefined index notice in wp_http_validate_url().
props jesin.
fixes #27684.
Built from https://develop.svn.wordpress.org/trunk@27953


git-svn-id: http://core.svn.wordpress.org/trunk@27783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-05 12:45:15 +00:00
Sergey Biryukov
74f77b85a6 Use get_current_site() instead of the $current_site global when possible.
props jeremyfelt.
fixes #25158.
Built from https://develop.svn.wordpress.org/trunk@26120


git-svn-id: http://core.svn.wordpress.org/trunk@26032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-13 03:23:10 +00:00
Sergey Biryukov
b85814e48c Inline documentation for hooks in http.php.
props tw2113.
see #25229.
Built from https://develop.svn.wordpress.org/trunk@25302


git-svn-id: http://core.svn.wordpress.org/trunk@25264 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-08 22:04:09 +00:00
Andrew Nacin
1ec392175c Additional checks when evaluating the safety of an HTTP request, to avoid false negatives.
* Check if the host is considered a safe redirect host.
 * Check if the host is another domain in a multisite installation.
 * Add a filter to control this.

This only occurs when the DNS resolution of a domain points elsewhere in an internal network, but only internally (and has its own public IP outside the network). This could be considered a bad configuration.

fixes #24646.



git-svn-id: http://core.svn.wordpress.org/trunk@24915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-31 06:44:57 +00:00
Andrew Nacin
3fc038fd6f Add missing documentation from [24894]. see #24646.
git-svn-id: http://core.svn.wordpress.org/trunk@24895 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-30 18:39:57 +00:00
Andrew Nacin
8c7adaa7bd Introduce wp_safe_remote_request(). Also wp_safe_remote_head(), wp_safe_remote_get(), wp_safe_remote_post().
Reverts [24482].

see #24646.



git-svn-id: http://core.svn.wordpress.org/trunk@24894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-30 15:37:01 +00:00
Andrew Nacin
ca64e771da In wp_http_validate_url(), only validate the protocol in lieu of esc_url_raw(). Ensure there is a host component to the URL. fixes #24663.
git-svn-id: http://core.svn.wordpress.org/trunk@24641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-10 13:35:30 +00:00
Andrew Nacin
96ee267343 Better validation of the URL used in core HTTP requests.
git-svn-id: http://core.svn.wordpress.org/trunk@24480 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-06-21 06:07:47 +00:00
Ryan Boren
4385abe40f Add default args list to wp_remote_request|get|post|head docblocks
Props DrewAPicture
fixes #23838


git-svn-id: http://core.svn.wordpress.org/trunk@24250 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-14 14:00:19 +00:00
Ryan Boren
ff07308717 Handle pre-flighted OPTIONS requests in send_origin_headers(). Props nacin. fixes #21024
git-svn-id: http://core.svn.wordpress.org/trunk@21988 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-24 21:39:04 +00:00
Ryan Boren
f483a85676 Remove unnecessary return by refs. Props wonderboymusic. fixes #21839
git-svn-id: http://core.svn.wordpress.org/trunk@21792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-10 17:00:11 +00:00
ryan
9c3ce86280 API for allowing cross origin resource sharing.
* Allowed origin whitelist that can be altered by plugins
* Validation of the request origin against the whitelist
* Send Access-Control-Allow-Origin if origin allowed
* get_http_origin(), get_allowed_http_origins(), is_allowed_http_origin(), send_origin_headers()

See #20681



git-svn-id: http://core.svn.wordpress.org/trunk@20794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-15 18:46:03 +00:00
ryan
07ff8b216b Use one space, not two, after trailing punctuation. fixes #19537
git-svn-id: http://svn.automattic.com/wordpress/trunk@19593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-13 23:45:31 +00:00
duck_
e4ed63fc6f Fix typos in documentation (wp-includes/[a-h]). See #18560.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-03 16:02:41 +00:00
westi
a851aaa167 Typo fix props duck_
git-svn-id: http://svn.automattic.com/wordpress/trunk@17915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-05-13 10:00:40 +00:00
westi
81cd0218ec Introduce wp_http_supports as a much less hacky replacement for the http_transport_(get|post)_debug hooks that plugins could have
been using to detect if things like ssl requests were working.
See #17251 props mdawaffe


git-svn-id: http://svn.automattic.com/wordpress/trunk@17914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-05-13 09:56:59 +00:00
ryan
1f93931d55 Always include class-http.php. see #12990
git-svn-id: http://svn.automattic.com/wordpress/trunk@14079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-13 21:45:57 +00:00
ryan
9ab7306993 Remove author tags. fixes #12366
git-svn-id: http://svn.automattic.com/wordpress/trunk@13377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-24 19:07:21 +00:00
dd32
d271b1357b Split WP_Http classes into separate file. Fixes #11559
git-svn-id: http://svn.automattic.com/wordpress/trunk@13274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-21 02:06:24 +00:00
ryan
dbfb51c6e0 Trim trailing whites
git-svn-id: http://svn.automattic.com/wordpress/trunk@13268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-21 00:03:42 +00:00
dd32
0c3a3e9be5 Disable Redirection on HEAD requests. See #10624
git-svn-id: http://svn.automattic.com/wordpress/trunk@13149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-14 10:41:07 +00:00
markjaquith
b42ea9c4ea Update the inline documentation for HTTP to reflect the true order of HTTP transports
git-svn-id: http://svn.automattic.com/wordpress/trunk@12785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-21 12:02:55 +00:00
dd32
45b2389358 Fix Typo in r12747, Move cURL Redirection check higher. See #11305
git-svn-id: http://svn.automattic.com/wordpress/trunk@12749 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-17 09:31:37 +00:00
dd32
5c739a4b9c Allow WP_HTTP_Fopen to send extra headers and custom user-agents. See #11888
git-svn-id: http://svn.automattic.com/wordpress/trunk@12748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-17 09:03:56 +00:00
dd32
b34906e9ec Allow cURL to follow redirects when running under safe_mode or open_basedir. See #11305
git-svn-id: http://svn.automattic.com/wordpress/trunk@12747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-17 08:15:52 +00:00
dd32
8c109d738b Fix WP_Http_Streams to return a single set of headers in the event of redirections. Fixes #11555
git-svn-id: http://svn.automattic.com/wordpress/trunk@12746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-17 08:05:58 +00:00
dd32
651925fe74 Bring WP_Http_Streams maximum redirection into line with the rest of the transports. Fixes #11557
git-svn-id: http://svn.automattic.com/wordpress/trunk@12745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-17 08:00:41 +00:00
dd32
e85a09e8e9 Correctly set the body on Curl requests with an empty body. Add a defensive check to WP_Http_Encoding::decompress to prevent the decompression functions running on empty strings. Fixes #11912
git-svn-id: http://svn.automattic.com/wordpress/trunk@12739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-16 23:11:28 +00:00
azaozz
36b2df4606 When decompressing try to raw-inflate first, props dd32, fixes #11600
git-svn-id: http://svn.automattic.com/wordpress/trunk@12642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-07 10:26:33 +00:00
ryan
5f20b65114 Don't use CURLOPT_CONNECTTIMEOUT_MS or CURLOPT_TIMEOUT_MS due to bugginess. fixes #11505 see #11499
git-svn-id: http://svn.automattic.com/wordpress/trunk@12472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-21 19:34:38 +00:00
ryan
28d836c672 Properly handle float timeouts for all transports. Props mdawaffe. fixes #11468
git-svn-id: http://svn.automattic.com/wordpress/trunk@12424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-17 16:13:58 +00:00
ryan
fee3cd75a3 Remove unused variable. Props hakre. fixes #10765
git-svn-id: http://svn.automattic.com/wordpress/trunk@12367 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-10 22:55:06 +00:00
westi
e7941d795e Ensure WP_DEBUG is always defined and simplify the checks on it. Fixes #11090 props nacin.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-11-18 08:22:49 +00:00
azaozz
e73a081be7 Expose HTTP PUT when supported, props mdawaffe, fixes #10855
git-svn-id: http://svn.automattic.com/wordpress/trunk@11977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-09-26 22:52:42 +00:00