[wp-trac] [WordPress Trac] #20219: GET - Too many redirects
WordPress Trac
wp-trac at lists.automattic.com
Wed Apr 4 21:46:45 UTC 2012
#20219: GET - Too many redirects
--------------------------+-----------------------
Reporter: Workshopshed | Owner: dd32
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 3.4
Component: HTTP | Version:
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+-----------------------
Changes (by SergeyBiryukov):
* status: closed => reopened
* resolution: fixed =>
Comment:
Seems that [20208] has some side effects.
While doing a fresh install for #13839, I've noticed that secret keys in
`wp-config.php` were empty.
`$secret_keys = wp_remote_get( 'https://api.wordpress.org/secret-
key/1.1/salt/' )` returned:
{{{
Array
(
[headers] => Array()
[body] =>
[response] => Array(
[code] => 0
[message] =>
)
[cookies] => Array()
[filename] =>
)
}}}
Turned out that before [20208] `wp_remote_get()` returned a cURL error:
{{{
SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify
failed
}}}
Perhaps SSL on my local WAMP is misconfigured, but I guess that can happen
on some hosts too.
Since [20208], the error is ignored and an empty response is returned
instead, so
`setup-config.php` doesn't fall back to `wp_generate_password()`.
`$theHeaders` value in this case is:
{{{
Array(
[response] => Array(
[code] => 0
[message] =>
)
[headers] => Array()
[cookies] => Array()
)
}}}
Seems that `empty( $theHeaders )` would always be false.
Shouldn't it be `empty( $theHeaders->headers )`? [attachment:20219.patch]
is an attempt to fix the issue.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20219#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list