WordPress.org

Ready to get started?Download WordPress

Forums

Network Privacy
[resolved] RSS Feed Authenticator Missing? (4 posts)

  1. alekarsovski
    Member
    Posted 2 years ago #

    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

    http://wordpress.org/extend/plugins/network-privacy/

  2. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 2 years ago #

    I was just wondering if you introduced some changes to 0.1.1 that aren't mentioned in the changelog.

    I can't introduce changes without them being recorded in the changelog.

    You can contact me at http://ronandandrea.com/contact.

  3. alekarsovski
    Member
    Posted 2 years ago #

    Hi again,

    I apologize for the mix-up. It seems that our team had forgotten to record their changes to the core Network Privacy plugin. I did check the changelog initially and there was no mention of the removal of the function, but the changelog is simply generated by the readme file. What I should have done is looked at the development log and all of this would have most likely been averted.

    Unfortunately, the Network Privacy plugin that is currently found on wordpress.org does not work with the Feed Key Generator plugin. I've left a more detailed comment/request on http://ronandandrea.com/contact. If you could please take a look at my request, it would be greatly appreciated.

    Once again, I apologize for the mix-up - version 0.1.1 works as expected and the bugs I've discovered are due to changes introduced by our team.

    Regards,

    Aleksandar

  4. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 2 years ago #

    Received. thanks :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic