Skip to content
GitLab
Menu
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
5aae1ac0
Commit
5aae1ac0
authored
Feb 02, 2011
by
Leigh B Stoller
Browse files
Make sure credentials is really a list.
parent
2eaab789
Changes
1
Hide whitespace changes
Inline
Side-by-side
protogeni/lib/GeniCMV2.pm.in
View file @
5aae1ac0
...
...
@@ -1478,13 +1478,18 @@ sub ListHistory($)
#
sub
CheckCredentials
($)
{
if
(
! ref($_[0]) != "ARRAY") {
return
GeniResponse
->
MalformedArgsResponse
(
"Credentials should be a "
.
"array not a singleton"
);
}
my
@
credentials
=
@{
$
_
[
0
]
};
if
(
scalar
(@
credentials
)
!= 1) {
return
GeniResponse
->
MalformedArgsResponse
(
"Wrong number of credentials"
);
}
my
$
credential
=
GeniCredential
->
CreateFromSigned
($
credentials
[
0
]);
my
$
credential
=
GeniCredential
->
CreateFromSigned
($
credentials
[
0
]);
if
(
!defined($credential)) {
return
GeniResponse
->
Create
(
GENIRESPONSE_ERROR
,
undef
,
"Could not create credential object"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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