{"id":7689866,"date":"2016-08-22T08:31:42","date_gmt":"2016-08-22T08:31:42","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/rss-authentication-problem\/"},"modified":"2016-09-01T18:08:36","modified_gmt":"2016-09-01T18:08:36","slug":"rss-authentication-problem","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/rss-authentication-problem\/","title":{"rendered":"RSS authentication problem"},"content":{"rendered":"<p>We&#8217;re experiencing a problem accessing the RSS feed when the plugin is enabled and the sites visibility is set to visible only for registered users or the administrator.<br \/>\nWhen accessing the feed (http:\/\/example.com\/feed\/) through a browser you&#8217;re prompted to insert the username and password twice.<\/p>\n<p>This is a problem when trying to access the feed from curl or with file_get_contents() in PHP.<\/p>\n<p>I&#8217;ve been able to replicate the problem on a clean WordPress installation and below are som header output from curl:<\/p>\n<p>Without the plugin enabled:<\/p>\n<pre><code>$ curl -I http:\/\/wordpress.domain.dev\/feed\/\nHTTP\/1.1 200 OK\nDate: Mon, 22 Aug 2016 08:24:02 GMT\nServer: Apache\/2.4.18 (Ubuntu)\nX-Pingback: http:\/\/wordpress.domain.dev\/xmlrpc.php\nLast-Modified: Mon, 28 Sep 2015 17:04:09 GMT\nETag: &quot;7e7f82da70bcfd2f08ba739248106f1d&quot;\nContent-Type: text\/html; charset=UTF-8<\/code><\/pre>\n<p>With the plugin enabled and visibility set to registered users or the administrator:<\/p>\n<pre><code>$ curl -u &quot;admin:password&quot; -I http:\/\/wordpress.domain.dev\/feed\/\nHTTP\/1.0 401 Unauthorized\nDate: Mon, 22 Aug 2016 08:24:12 GMT\nServer: Apache\/2.4.18 (Ubuntu)\nX-Pingback: http:\/\/wordpress.domain.dev\/xmlrpc.php\nLast-Modified: Mon, 28 Sep 2015 17:04:09 GMT\nETag: &quot;7e7f82da70bcfd2f08ba739248106f1d&quot;\nSet-Cookie: wordpress_41193cf728d4d7b51d01f6c22f880058=admin%7C1473063853%7ConSnJR8ce7ICpqzCyJKy5BZQYyLazVA5DDguZDwjgaS%7Cf4a0623ef9593e7b3554e77a68787dcc21473eff9eea4bfcaeb6590cfee85889; expires=Mon, 05-Sep-2016 20:24:13 GMT; Max-Age=1252800; path=\/wp-content\/plugins; HttpOnly\nSet-Cookie: wordpress_41193cf728d4d7b51d01f6c22f880058=admin%7C1473063853%7ConSnJR8ce7ICpqzCyJKy5BZQYyLazVA5DDguZDwjgaS%7Cf4a0623ef9593e7b3554e77a68787dcc21473eff9eea4bfcaeb6590cfee85889; expires=Mon, 05-Sep-2016 20:24:13 GMT; Max-Age=1252800; path=\/; HttpOnly\nSet-Cookie: wordpress_logged_in_41193cf728d4d7b51d01f6c22f880058=admin%7C1473063853%7ConSnJR8ce7ICpqzCyJKy5BZQYyLazVA5DDguZDwjgaS%7C30852dc698dfdfa76729a3b9f0f90a2ac271c19bb09104fcef42d298b6c8921e; expires=Mon, 05-Sep-2016 20:24:13 GMT; Max-Age=1252800; path=\/; HttpOnly\nWWW-Authenticate: Basic realm=&quot;wordpress.domain.dev&quot;\nConnection: close\nContent-Type: text\/html; charset=UTF-8<\/code><\/pre>\n<p>https:\/\/wordpress.org\/plugins\/more-privacy-options\/<\/p>\n","protected":false},"template":"","class_list":["post-7689866","topic","type-topic","status-publish","hentry","topic-tag-authentication","topic-tag-curl","topic-tag-file_get_contents","topic-tag-password","topic-tag-rss"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7689866","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7689866\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=7689866"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}