Commit 8339fa3a authored by Nigel McNie's avatar Nigel McNie
Browse files

Use AccessDeniedException when networking is disabled on a Mahara and someone tries to SSO there.

This makes it far more obvious what has gone wrong, and on which site networking has failed.


parent c3b73409
......@@ -50,12 +50,7 @@ require(dirname(dirname(dirname(__FILE__))).'/init.php');
// If networking is turned off, it's safer to die immediately
if (!get_config('enablenetworking')) {
$protocol = strtoupper($_SERVER['SERVER_PROTOCOL']);
if ($protocol != 'HTTP/1.1') {
$protocol = 'HTTP/1.0';
header($protocol.' 403 Forbidden');
throw new AccessDeniedException(get_string('networkingdisabledonthissite', 'auth.xmlrpc'));
require_once(get_config('docroot') .'api/xmlrpc/client.php');
Supports Markdown
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