Skip to content

Commit 11e7288

Browse files
author
Jan Kaluža
committed
* t/hooks/TestHooks/authz.pm: Hardcode "dougm" username, because we don't
have access to ap_requires in httpd-2.4. Another way could be to create new auth provider, but that's already tested in access2.t git-svn-id: https://svn.apache.org/repos/asf/perl/modperl/branches/httpd24@1448209 13f79535-47bb-0310-9956-ffa450edef68
1 parent 6bfc33f commit 11e7288

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

t/hooks/TestHooks/authz.pm

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use Apache2::Access ();
88
use Apache2::Const -compile => qw(OK HTTP_UNAUTHORIZED);
99

1010
sub auth_any {
11+
my $self = shift;
1112
my $r = shift;
1213

1314
my ($res, $sent_pw) = $r->get_basic_auth_pw;
@@ -30,9 +31,7 @@ sub handler {
3031

3132
return Apache2::Const::HTTP_UNAUTHORIZED unless $user;
3233

33-
my ($u, @allowed) = split /\s+/, $r->requires->[0]->{requirement};
34-
35-
return Apache2::Const::HTTP_UNAUTHORIZED unless grep { $_ eq $user } @allowed;
34+
return Apache2::Const::HTTP_UNAUTHORIZED unless "dougm" eq $user;
3635

3736
Apache2::Const::OK;
3837
}
@@ -43,6 +42,6 @@ require user dougm
4342
AuthType Basic
4443
AuthName simple
4544
PerlModule TestHooks::authz
46-
PerlAuthenHandler TestHooks::authz::auth_any
45+
PerlAuthenHandler TestHooks::authz->auth_any
4746
PerlResponseHandler Apache::TestHandler::ok1
4847
SetHandler modperl

0 commit comments

Comments
 (0)