[Plugin: Network Privacy] RSS Feed Authenticator Missing?
-
Hi,
I’m currently using a version of “Network Privacy” that blocks RSS feeds if the user is not logged in. I’ve been developing a plugin that enables users that have a private blog using “Network Privacy” to generate private feed keys which can be used to access the private feeds even while users are logged out. However, as I was testing my plugin alongside the Network Privacy plugin, I discovered that the Network Privacy plugin does not block comment feeds (i.e. mysite.com/comments/feed/) and rdf feeds (mysite.com/feed/rdf/). I had tinkered with the Network Privacy plugin before just to look at its inner workings so I re-downloaded version 0.1.1 to make sure that there weren’t any accidental changes I’d saved. Looking upon the freshly downloaded 0.1.1 version off of WordPress.org and the version installed on my machine, I noticed that the newly downloaded version did not contain the original functions that restrict access to feeds. I checked the version on my local machine and it is also 0.1.1; however, the code does not match. I’ve been recommending users to use Network Privacy with “Feed Key Generator” so I was just wondering if you introduced some changes to 0.1.1 that aren’t mentioned in the changelog.
If you do decide to bring back the feed blocking feature, I would also like to present the code that I’ve currently added to my install to make sure that comment and rdf feeds are blocked properly:
//These go in the RA_Network_Privacy() function under the RA_Network_Privacy class //I think the "commentrss2_head" action hook isn't doing anything either so it could be removed? add_action( 'rdf_header', array( &$this, 'feed_authenticator' ) ); add_action( 'rss2_comments_ns', array( &$this, 'feed_authenticator_comments' ) ); //This function should go anywhere in the RA_Network_Privacy class ( probably best after feed_authenticator() ) function feed_authenticator_comments() { $privacy = get_option( 'blog_public' ); if( $privacy > -1 || ( is_user_logged_in() && ( $privacy > -2 || current_user_can( $this->meta[$privacy]['cap'] ) ) ) ) return; ?> > <channel> <title><?php bloginfo_rss( 'name' ); wp_title_rss(); ?></title> <link><?php bloginfo_rss( 'url' ) ?></link> <description><?php bloginfo_rss( 'description' ) ?></description> <lastBuildDate><?php echo mysql2date( 'D, d M Y H:i:s +0000', get_lastpostmodified( 'GMT' ), false ); ?></lastBuildDate> <docs>http://backend.userland.com/rss092</docs> <language><?php echo get_option( 'rss_language' ); ?></language> </channel> </rss> <?php exit(); }
Lastly, if you wish, I could also send you the code which featured the authentication that I currently have on my install.
Regards,
Aleksandar
- The topic ‘[Plugin: Network Privacy] RSS Feed Authenticator Missing?’ is closed to new replies.