Fix #2802
This commit is contained in:
parent
579f0c70ca
commit
ccb898f24a
|
@ -412,8 +412,8 @@ sub reloadConf {
|
||||||
|
|
||||||
# Handle wildcards
|
# Handle wildcards
|
||||||
if ( $vhost =~ /[\%\*]/ ) {
|
if ( $vhost =~ /[\%\*]/ ) {
|
||||||
$expr =~ s/\\\*/[A-Za-z0-9\.]\*/;
|
$expr =~ s/\\\*/[A-Za-z0-9\-\.]\*/;
|
||||||
$expr =~ s/\\\%/[A-Za-z0-9]\*/;
|
$expr =~ s/\\\%/[A-Za-z0-9\-]\*/;
|
||||||
}
|
}
|
||||||
$re->add($expr);
|
$re->add($expr);
|
||||||
$self->logger->debug("Vhost $vhost added in trusted domains");
|
$self->logger->debug("Vhost $vhost added in trusted domains");
|
||||||
|
|
|
@ -121,7 +121,7 @@ ok(
|
||||||
$res = $client->_get(
|
$res = $client->_get(
|
||||||
'/',
|
'/',
|
||||||
cookie => "lemonldap=$id",
|
cookie => "lemonldap=$id",
|
||||||
query => 'url=' . encodeUrl('http://sub.cda.example.llng/'),
|
query => 'url=' . encodeUrl('http://sub-domain.cda.example.llng/'),
|
||||||
accept => 'text/html',
|
accept => 'text/html',
|
||||||
),
|
),
|
||||||
'CDA request to subdomain'
|
'CDA request to subdomain'
|
||||||
|
@ -129,14 +129,14 @@ ok(
|
||||||
count(1);
|
count(1);
|
||||||
|
|
||||||
my ($querytosub) = expectRedirection( $res,
|
my ($querytosub) = expectRedirection( $res,
|
||||||
qr#^http://sub.cda.example.llng/\?(lemonldapcda=.*)$# );
|
qr#^http://sub-domain.cda.example.llng/\?(lemonldapcda=.*)$# );
|
||||||
|
|
||||||
# Check that %.oneonly.llng rejects subdomains
|
# Check that %.oneonly.llng rejects subdomains
|
||||||
ok(
|
ok(
|
||||||
$res = $client->_get(
|
$res = $client->_get(
|
||||||
'/',
|
'/',
|
||||||
cookie => "lemonldap=$id",
|
cookie => "lemonldap=$id",
|
||||||
query => 'url=' . encodeUrl('http://sub.cda.oneonly.llng/'),
|
query => 'url=' . encodeUrl('http://sub-domain.cda.oneonly.llng/'),
|
||||||
accept => 'text/html',
|
accept => 'text/html',
|
||||||
),
|
),
|
||||||
'CDA request to subdomain'
|
'CDA request to subdomain'
|
||||||
|
@ -159,9 +159,9 @@ count(1);
|
||||||
my ($querytoone) =
|
my ($querytoone) =
|
||||||
expectRedirection( $res, qr#^http://cda.oneonly.llng/\?(lemonldapcda=.*)$# );
|
expectRedirection( $res, qr#^http://cda.oneonly.llng/\?(lemonldapcda=.*)$# );
|
||||||
|
|
||||||
validate_cda( $client, $querytosub, 'sub.cda.example.llng', 'dwho' );
|
validate_cda( $client, $querytosub, 'sub-domain.cda.example.llng', 'dwho' );
|
||||||
validate_cda( $client, $query, 'cda.example.llng', 'dwho' );
|
validate_cda( $client, $query, 'cda.example.llng', 'dwho' );
|
||||||
validate_cda( $client, $querytoone, 'cda.oneonly.llng', 'dwho' );
|
validate_cda( $client, $querytoone, 'cda.oneonly.llng', 'dwho' );
|
||||||
|
|
||||||
clean_sessions();
|
clean_sessions();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue