Skip to content
Snippets Groups Projects
Commit b2a3342a authored by Tim Roes's avatar Tim Roes
Browse files

Added more detail error code for unauthorized calls in xmlrpc interface.

parent bfa60279
No related branches found
No related tags found
No related merge requests found
......@@ -30,10 +30,11 @@ class dokuwiki_xmlrpc_server extends IXR_Server {
} catch (RemoteAccessDeniedException $e) {
if (!isset($_SERVER['REMOTE_USER'])) {
header('HTTP/1.1 401 Unauthorized');
return new IXR_Error(-32603, "server error. not authorized to call method $methodname");
} else {
header('HTTP/1.1 403 Forbidden');
return new IXR_Error(-32604, "server error. forbidden to call the method $methodname");
}
return new IXR_Error(-32603, "server error. not authorized to call method $methodname");
} catch (RemoteException $e) {
return new IXR_Error($e->getCode(), $e->getMessage());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment