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
c4c8823f
Commit
c4c8823f
authored
Apr 07, 2011
by
Leigh B Stoller
Browse files
Add some sanity checking during new authority checkin.
parent
f46d06f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
protogeni/lib/GeniCH.pm.in
View file @
c4c8823f
...
...
@@ -144,7 +144,14 @@ sub GetCredential($)
"Malformed URN in the certificate"
)
if
(
!GeniHRN::IsValid($urn));
my
($
auth
,
$
type
,
$
id
)
=
GeniHRN
::
Parse
($
urn
);
return
GeniResponse
->
Create
(
GENIRESPONSE_BADARGS
,
undef
,
"Not an authority certificate"
)
if
($
type
ne
"authority"
);
return
GeniResponse
->
Create
(
GENIRESPONSE_BADARGS
,
undef
,
"Not an am/cm/sa/ses certificate"
)
if
(
! ($id =~ /^(am|cm|ses|sa)$/i));
#
#
Check
for
an
existing
authority
.
#
...
...
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