perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vegard Vesterheim <vegard.vesterh...@uninett.no>
Subject Re: htaccess using AuthCookieDBI not protecting the directory index
Date Mon, 07 Sep 2009 19:30:22 GMT
On Mon, 07 Sep 2009 20:04:05 +0200 Tosh Cooey <tosh@1200group.com> wrote:

> Hi, I either have the strangest issue or else I've made a blindingly
> obvious error.
>
> I'm trying to protect a directory using Apache2::AuthCookieDBI using the
> following .htaccess (I have to use htaccess)

Sounds similar to a problem I encountered using
Apache2::AuthCookieDBI. In my case it was related to Apache issuing
subrequests for directory requests. Check out this thread:

http://marc.info/?t=119996312400002&r=1&w=2

My fix was to override the authenticate method to explicitly set the user for
subrequests, something like this:
  ....
  my $status = $self->SUPER::authenticate($r);
  $r->user($r->main->user) if (defined $r->main and defined $r->main->user);
  ...

 - Vegard V -

Mime
View raw message