Commit 04977815 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Minor bug fixes to hrn regex.

parent b6ac7dbb
......@@ -330,7 +330,8 @@ sub CreateFromSigned($$;$)
return undef;
}
if (!($target_certificate->hrn() =~ /^[-\w\.]+$/)) {
print STDERR "Invalid hrn in credential\n";
my $hrn = $target_certificate->hrn();
print STDERR "Invalid hrn $hrn in target of credential\n";
return undef;
}
if (!GeniHRN::IsValid($target_certificate->urn())) {
......@@ -353,7 +354,8 @@ sub CreateFromSigned($$;$)
return undef;
}
if (!($owner_certificate->hrn() =~ /^[-\w\.]+$/)) {
print STDERR "Invalid hrn in credential\n";
my $hrn = $owner_certificate->hrn();
print STDERR "Invalid hrn $hrn in owner of credential\n";
return undef;
}
if (!GeniHRN::IsValid($owner_certificate->urn())) {
......
......@@ -337,8 +337,9 @@ sub CreateFromSignedTicket($$;$$)
print STDERR "Invalid target_uuid in credential\n";
return undef;
}
if (!($target_certificate->hrn() =~ /^[\w\.]+$/)) {
print STDERR "Invalid hrn in credential\n";
if (!($target_certificate->hrn() =~ /^[-\w\.]+$/)) {
my $hrn = $target_certificate->hrn();
print STDERR "Invalid hrn $hrn in target of ticket\n";
return undef;
}
......@@ -358,8 +359,9 @@ sub CreateFromSignedTicket($$;$$)
print STDERR "Invalid target_uuid in credential\n";
return undef;
}
if (!($owner_certificate->hrn() =~ /^[\w\.]+$/)) {
print STDERR "Invalid hrn in credential\n";
if (!($owner_certificate->hrn() =~ /^[-\w\.]+$/)) {
my $hrn = $owner_certificate->hrn();
print STDERR "Invalid hrn $hrn in owner of ticket\n";
return undef;
}
......
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