Closes: #314163 : testUri() unusable
This commit is contained in:
parent
771bf46a5f
commit
bfebb497a1
|
@ -56,7 +56,7 @@ sub new {
|
|||
$rule =~ s/\$(\w+)/\$datas->{$1}/g;
|
||||
$rule = 0 if($rule eq 'deny');
|
||||
my $r;
|
||||
unless ( $rule eq 'accept' or $safe->reval($rule) ) {
|
||||
unless ( $rule eq 'accept' or $_handler->safe->reval($rule) ) {
|
||||
$self->abort( 'Forbidden',
|
||||
"You don't have rights to access this page" );
|
||||
}
|
||||
|
@ -162,6 +162,7 @@ sub _uri {
|
|||
# Private class used by Lemonldap::NG::Handler::CGI for his internal handler.
|
||||
package Lemonldap::NG::Handler::_CGI;
|
||||
|
||||
use strict;
|
||||
use Lemonldap::NG::Handler::SharedConf qw(:locationRules :localStorage :traces);
|
||||
|
||||
use base qw(Lemonldap::NG::Handler::SharedConf);
|
||||
|
@ -202,6 +203,11 @@ sub vhostAvailable {
|
|||
sub grant {
|
||||
my ( $self, $uri, $vhost ) = @_;
|
||||
$vhost ||= $ENV{SERVER_NAME};
|
||||
$apacheRequest = Lemonldap::NG::Apache::Request->new({
|
||||
uri => $uri,
|
||||
hostname => $vhost,
|
||||
args => '',
|
||||
});
|
||||
for ( my $i = 0 ; $i < $locationCount->{$vhost} ; $i++ ) {
|
||||
if ( $uri =~ $locationRegexp->{$vhost}->[$i] ) {
|
||||
return &{ $locationCondition->{$vhost}->[$i] }($datas);
|
||||
|
@ -217,6 +223,26 @@ sub grant {
|
|||
return &{ $defaultCondition->{$vhost} }($datas);
|
||||
}
|
||||
|
||||
package Lemonldap::NG::Apache::Request;
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
my $self = shift;
|
||||
return bless $self, $class;
|
||||
}
|
||||
|
||||
sub hostname {
|
||||
return $_[0]->{hostname};
|
||||
}
|
||||
|
||||
sub uri {
|
||||
return $_[0]->{uri};
|
||||
}
|
||||
|
||||
sub args {
|
||||
return $_[0]->{args};
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
|
|
|
@ -171,7 +171,7 @@ sub displayTab {
|
|||
if (
|
||||
(
|
||||
scalar(
|
||||
grep { /^$self->{error}$/ } (
|
||||
grep { $_ == $self->{error} } (
|
||||
25, #PE_PP_CHANGE_AFTER_RESET
|
||||
27, #PE_PP_MUST_SUPPLY_OLD_PASSWORD
|
||||
28, #PE_PP_INSUFFICIENT_PASSWORD_QUALITY
|
||||
|
|
Loading…
Reference in New Issue