Commit 6e3cb623 authored by Xavier Guimard's avatar Xavier Guimard

Remove registerUrl: fixed to /register (#595)

parent e923a87d
......@@ -2014,7 +2014,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
'type' => 'text'
},
'registerDB' => {
'default' => 'Demo',
'default' => 'Null',
'select' => [
{
'k' => 'AD',
......@@ -2043,10 +2043,6 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
'default' => 0,
'type' => 'int'
},
'registerUrl' => {
'default' => 'http://auth.example.com/register.pl',
'type' => 'text'
},
'reloadUrls' => {
'keyTest' =>
qr/^(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?)|(?:[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+))(?::\d+)?$/,
......@@ -2339,6 +2335,31 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
'type' => 'bool'
},
'samlIDPMetaDataXML' => {
'test' => sub {
my $v = shift();
return 1 unless $v and %$v;
my @msg;
my $res = 1;
my %entityIds;
foreach my $idpId ( keys %$v ) {
unless ( $v->{$idpId}{'samlIDPMetaDataXML'} =~
/entityID="(.+?)"/is )
{
push @msg, "$idpId SAML metadata has ne EntityID";
$res = 0;
next;
}
my $eid = $1;
if ( defined $entityIds{$eid} ) {
push @msg,
"$idpId and $entityIds{$eid} have the same SAML EntityID";
$res = 0;
next;
}
$entityIds{$eid} = $idpId;
}
return $res, join( ', ', @msg );
},
'type' => 'file'
},
'samlIdPResolveCookie' => {
......
......@@ -894,7 +894,7 @@ sub attributes {
{ k => 'LDAP', v => 'LDAP' },
{ k => 'Null', v => 'None' },
],
default => 'Demo',
default => 'Null',
documentation => 'Register module',
},
registerDoneSubject => {
......@@ -907,11 +907,6 @@ sub attributes {
type => 'int',
documentation => 'Register session timeout',
},
registerUrl => {
type => 'text',
default => 'http://auth.example.com/register.pl',
documentation => 'URL of register page',
},
# Single session
notifyDeleted => {
......@@ -1433,6 +1428,31 @@ sub attributes {
},
samlIDPMetaDataXML => {
type => 'file',
test => sub {
my $v = shift;
return 1 unless ( $v and %$v );
my @msg;
my $res = 1;
my %entityIds;
foreach my $idpId ( keys %$v ) {
unless ( $v->{$idpId}->{samlIDPMetaDataXML} =~
/entityID="(.+?)"/si )
{
push @msg, "$idpId SAML metadata has ne EntityID";
$res = 0;
next;
}
my $eid = $1;
if ( defined $entityIds{$eid} ) {
push @msg,
"$idpId and $entityIds{$eid} have the same SAML EntityID";
$res = 0;
next;
}
$entityIds{$eid} = $idpId;
}
return ( $res, join( ', ', @msg ) );
},
},
samlIDPMetaDataOptions => {
type => 'keyTextContainer',
......
......@@ -587,7 +587,6 @@ sub tree {
form => 'simpleInputContainer',
nodes => [
'registerDB',
'registerUrl',
'registerTimeout',
'registerConfirmSubject',
'registerDoneSubject'
......
......@@ -269,29 +269,6 @@ sub tests {
# Return
return 1;
},
# SAML entity ID must be uniq
samlIDPEntityIdUniqueness => sub {
return 1 unless ($conf->{samlIDPMetaDataXML} and %{$conf->{samlIDPMetaDataXML}});
my @msg;
my $res = 1;
my %entityIds;
foreach my $idpId (keys %{$conf->{samlIDPMetaDataXML}}) {
unless($conf->{samlIDPMetaDataXML}->{$idpId}->{samlIDPMetaDataXML} =~ /entityID="(.+?)"/si) {
push @msg, "$idpId SAML metadata has ne EntityID";
$res = 0;
next;
}
my $eid = $1;
if(defined $entityIds{$eid}) {
push @msg, "$idpId and $entityIds{$eid} have the same SAML EntityID";
$res = 0;
next;
}
$entityIds{$eid} = $idpId;
}
return ($res, join(', ',@msg));
},
};
}
......
......@@ -541,7 +541,6 @@
"registerDB": "Module",
"registerDoneSubject": "Subject for done mail",
"registerTimeout": "Validity time of a register request",
"registerUrl": "Page URL",
"reloadUrls": "Configuration reload",
"remoteCookieName": "Cookie name",
"remoteGlobalStorage": "Sessions module",
......
......@@ -541,7 +541,6 @@
"registerDB": "Module",
"registerDoneSubject": "Sujet du mail de prise en compte",
"registerTimeout": "Durée de validité de la requête",
"registerUrl": "URL de la page",
"reloadUrls": "Mise à jour de la configuration",
"remoteCookieName": "Nom du cookie",
"remoteGlobalStorage": "Module des sessions",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment