Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
edfcdf07
Commit
edfcdf07
authored
Aug 03, 2007
by
Donal McMullan
Browse files
Better error handling for failure to retrieve key from peer
parent
2b3d2cb3
Changes
2
Show whitespace changes
Inline
Side-by-side
htdocs/auth/xmlrpc/lib.php
View file @
edfcdf07
...
...
@@ -591,6 +591,14 @@ class PluginAuthXmlrpc extends PluginAuth {
$authinstance
=
new
stdClass
();
$peer
=
new
Peer
();
if
(
false
==
$peer
->
findByWwwroot
(
$values
[
'wwwroot'
]))
{
try
{
$peer
->
bootstrap
(
$values
[
'wwwroot'
],
null
,
$values
[
'appname'
],
$values
[
'institution'
]);
}
catch
(
RemoteServerException
$e
)
{
$form
->
set_error
(
'wwwroot'
,
get_string
(
'cantretrievekey'
,
'auth'
));
}
}
//TODO: test values and set appropriate errors on form
}
...
...
htdocs/lib/peer.php
View file @
edfcdf07
...
...
@@ -217,6 +217,8 @@ class Peer {
$errcode
=
$e
->
getCode
();
if
(
$errcode
==
404
)
{
throw
new
RemoteServerException
(
'404: Incorrect WWWRoot or Application: file not found.'
);
}
elseif
(
$errcode
==
704
)
{
throw
new
RemoteServerException
(
'Networking is disabled on the host at '
.
$this
->
wwwroot
.
'.'
);
}
}
catch
(
Exception
$e
)
{
throw
new
RemoteServerException
(
'Error retrieving public key '
);
...
...
Write
Preview
Supports
Markdown
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