Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
04977815
Commit
04977815
authored
Jun 09, 2010
by
Leigh B Stoller
Browse files
Minor bug fixes to hrn regex.
parent
b6ac7dbb
Changes
2
Hide whitespace changes
Inline
Side-by-side
protogeni/lib/GeniCredential.pm.in
View file @
04977815
...
...
@@ -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())) {
...
...
protogeni/lib/GeniTicket.pm.in
View file @
04977815
...
...
@@ -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;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment