[pmwiki-users] RSS & password-protected pages

Patrick R. Michaud pmichaud at pobox.com
Mon Oct 16 11:06:43 CDT 2006


On Fri, Oct 13, 2006 at 10:11:26AM +0200, Mike wrote:
> Hello!
> 
> Jon Haupt wrote on 12.10.2006 21:05:
> > Mike wrote:
> >> is it possible to set up an RSS feed for a read-password-protected
> >> group - with the RSS feed of course being just as protected as 
> >> the group in itself?
> >
> > http://article.gmane.org/gmane.comp.web.wiki.pmwiki.user/33299
> > It is possible to put a password into the RSS feed url, however.
> > Try placing the following in config.php:
> > 
> >     if ( <at> $_GET['authpw']) $_POST['authpw'] = $_GET['authpw'];
> > 
> > Then the rss feed can be accessed using
> > 
> >     http://www.example.com/pmwiki?action=rss&authpw=password
> 
> I'm not getting this to work. First, I removed the "<at>" stuff which I
> don't understand anyway, hope this didn't destroy anything. 

That's the mailing list converting the "@" of the original message into
"<at>".  It's okay to omit it, although you may get some odd warnings
at times.

> Second, I am using Auth User, which probably will make things 
> more complicated.

Slightly.

> Finally, I am actually receiving RSS pages in my RSS reader - but they
> all show only the password prompt. 

This is because PmWiki refuses to display a read-protected page's
contents in any form if the browser isn't authorized for it.  In this
case, it's the page that contains the list of pages to display that
is read protected.

Unfortunately, many RSS readers don't have a convenient way to provide 
authorization information for feeds.  The best we can do at present
is to provide it in the URL.

Since you're using AuthUser, you'll want the following near
the top of your local/config.php (before loading the authuser.php script):

    if (@$_GET['authpw']) $_POST['authpw'] = $_GET['authpw'];
    if (@$_GET['authid']) $_POST['authid'] = $_GET['authid'];

This allows authorization information to come from urls as well as
forms.  Then, in the RSS feed url, use:

    http://www.example.com/pmwiki?action=rss&authid=username&authpw=password

Pm




More information about the pmwiki-users mailing list