#28 in progress

This commit is contained in:
Xavier Guimard 2010-09-18 06:41:48 +00:00
parent c80795805a
commit 85d384bac1

View File

@ -106,9 +106,15 @@ sub sregHook {
my ( %r, @req, @opt );
while ( my ( $k, $v ) = each %prm ) {
if ( $k eq 'policy_url' ) {
if ( $v =~ m{^https?://\S+} ) {
if ( $v =~
m{^https?://(?:(?:(?:(?:(?:(?:[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]+)))(?::(?:(?:[0-9]*)))?(?:/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)(?:;(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*))*)(?:/(?:(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)(?:;(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*))*))*))))?$}
)
{
$self->{openIdCustomerPolicy} = $v;
}
else {
$self->lmLog( "Bad policy url", 'error' );
}
}
elsif ( $k eq 'required' ) {
push @req, split( /,/, $v );