Remove the inconsistently applied now pointless FailIfRemoteAdminDisabled() check on XMLRPC RemoteAdmin handlers.
If admin is disabled then the XMLRPC handlers are never registered, which means that they cannot be called anyway.remove-scene-viewer
parent
71d29decc8
commit
29660fe175
|
@ -192,16 +192,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FailIfRemoteAdminDisabled(string requestName)
|
|
||||||
{
|
|
||||||
if (m_config == null)
|
|
||||||
{
|
|
||||||
string errorMessage = String.Format("[RADMIN] {0}: Remote admin request denied! Please set [RemoteAdmin] enabled=true in OpenSim.ini in order to enable remote admin functionality", requestName);
|
|
||||||
m_log.Error(errorMessage);
|
|
||||||
throw new ApplicationException(errorMessage);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void FailIfRemoteAdminNotAllowed(string password, string check_ip_address)
|
private void FailIfRemoteAdminNotAllowed(string password, string check_ip_address)
|
||||||
{
|
{
|
||||||
if (m_accessIP.Count > 0 && !m_accessIP.Contains(check_ip_address))
|
if (m_accessIP.Count > 0 && !m_accessIP.Contains(check_ip_address))
|
||||||
|
@ -379,7 +369,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
}
|
}
|
||||||
|
|
||||||
public XmlRpcResponse XmlRpcSaveHeightmapMethod(XmlRpcRequest request, IPEndPoint remoteClient)
|
public XmlRpcResponse XmlRpcSaveHeightmapMethod(XmlRpcRequest request, IPEndPoint remoteClient)
|
||||||
|
|
||||||
{
|
{
|
||||||
XmlRpcResponse response = new XmlRpcResponse();
|
XmlRpcResponse response = new XmlRpcResponse();
|
||||||
Hashtable responseData = new Hashtable();
|
Hashtable responseData = new Hashtable();
|
||||||
|
@ -570,8 +559,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
{
|
{
|
||||||
m_log.Info("[RADMIN]: CreateRegion: new request");
|
m_log.Info("[RADMIN]: CreateRegion: new request");
|
||||||
|
|
||||||
FailIfRemoteAdminDisabled("CreateRegion");
|
|
||||||
|
|
||||||
XmlRpcResponse response = new XmlRpcResponse();
|
XmlRpcResponse response = new XmlRpcResponse();
|
||||||
Hashtable responseData = new Hashtable();
|
Hashtable responseData = new Hashtable();
|
||||||
|
|
||||||
|
@ -927,6 +914,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
public XmlRpcResponse XmlRpcCloseRegionMethod(XmlRpcRequest request, IPEndPoint remoteClient)
|
public XmlRpcResponse XmlRpcCloseRegionMethod(XmlRpcRequest request, IPEndPoint remoteClient)
|
||||||
{
|
{
|
||||||
m_log.Info("[RADMIN]: CloseRegion: new request");
|
m_log.Info("[RADMIN]: CloseRegion: new request");
|
||||||
|
|
||||||
XmlRpcResponse response = new XmlRpcResponse();
|
XmlRpcResponse response = new XmlRpcResponse();
|
||||||
Hashtable responseData = new Hashtable();
|
Hashtable responseData = new Hashtable();
|
||||||
Scene scene = null;
|
Scene scene = null;
|
||||||
|
@ -1130,8 +1118,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
{
|
{
|
||||||
m_log.Info("[RADMIN]: CreateUser: new request");
|
m_log.Info("[RADMIN]: CreateUser: new request");
|
||||||
|
|
||||||
FailIfRemoteAdminDisabled("CreateUser");
|
|
||||||
|
|
||||||
XmlRpcResponse response = new XmlRpcResponse();
|
XmlRpcResponse response = new XmlRpcResponse();
|
||||||
Hashtable responseData = new Hashtable();
|
Hashtable responseData = new Hashtable();
|
||||||
|
|
||||||
|
@ -1245,8 +1231,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
{
|
{
|
||||||
m_log.Info("[RADMIN]: UserExists: new request");
|
m_log.Info("[RADMIN]: UserExists: new request");
|
||||||
|
|
||||||
FailIfRemoteAdminDisabled("UserExists");
|
|
||||||
|
|
||||||
XmlRpcResponse response = new XmlRpcResponse();
|
XmlRpcResponse response = new XmlRpcResponse();
|
||||||
Hashtable responseData = new Hashtable();
|
Hashtable responseData = new Hashtable();
|
||||||
|
|
||||||
|
@ -1348,8 +1332,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
m_log.Info("[RADMIN]: UpdateUserAccount: new request");
|
m_log.Info("[RADMIN]: UpdateUserAccount: new request");
|
||||||
m_log.Warn("[RADMIN]: This method needs update for 0.7");
|
m_log.Warn("[RADMIN]: This method needs update for 0.7");
|
||||||
|
|
||||||
FailIfRemoteAdminDisabled("UpdateUserAccount");
|
|
||||||
|
|
||||||
XmlRpcResponse response = new XmlRpcResponse();
|
XmlRpcResponse response = new XmlRpcResponse();
|
||||||
Hashtable responseData = new Hashtable();
|
Hashtable responseData = new Hashtable();
|
||||||
|
|
||||||
|
@ -2259,8 +2241,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
{
|
{
|
||||||
m_log.Info("[RADMIN]: Received Load OAR Administrator Request");
|
m_log.Info("[RADMIN]: Received Load OAR Administrator Request");
|
||||||
|
|
||||||
FailIfRemoteAdminDisabled("Load OAR");
|
|
||||||
|
|
||||||
XmlRpcResponse response = new XmlRpcResponse();
|
XmlRpcResponse response = new XmlRpcResponse();
|
||||||
Hashtable responseData = new Hashtable();
|
Hashtable responseData = new Hashtable();
|
||||||
|
|
||||||
|
@ -2370,8 +2350,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
{
|
{
|
||||||
m_log.Info("[RADMIN]: Received Save OAR Administrator Request");
|
m_log.Info("[RADMIN]: Received Save OAR Administrator Request");
|
||||||
|
|
||||||
FailIfRemoteAdminDisabled("Save OAR");
|
|
||||||
|
|
||||||
XmlRpcResponse response = new XmlRpcResponse();
|
XmlRpcResponse response = new XmlRpcResponse();
|
||||||
Hashtable responseData = new Hashtable();
|
Hashtable responseData = new Hashtable();
|
||||||
|
|
||||||
|
@ -2467,8 +2445,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
{
|
{
|
||||||
m_log.Info("[RADMIN]: Received Load XML Administrator Request");
|
m_log.Info("[RADMIN]: Received Load XML Administrator Request");
|
||||||
|
|
||||||
FailIfRemoteAdminDisabled("Load XML");
|
|
||||||
|
|
||||||
XmlRpcResponse response = new XmlRpcResponse();
|
XmlRpcResponse response = new XmlRpcResponse();
|
||||||
Hashtable responseData = new Hashtable();
|
Hashtable responseData = new Hashtable();
|
||||||
|
|
||||||
|
@ -2547,8 +2523,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
{
|
{
|
||||||
m_log.Info("[RADMIN]: Received Save XML Administrator Request");
|
m_log.Info("[RADMIN]: Received Save XML Administrator Request");
|
||||||
|
|
||||||
FailIfRemoteAdminDisabled("Save XML");
|
|
||||||
|
|
||||||
XmlRpcResponse response = new XmlRpcResponse();
|
XmlRpcResponse response = new XmlRpcResponse();
|
||||||
Hashtable responseData = new Hashtable();
|
Hashtable responseData = new Hashtable();
|
||||||
|
|
||||||
|
@ -2623,8 +2597,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
{
|
{
|
||||||
m_log.Info("[RADMIN]: Received Query XML Administrator Request");
|
m_log.Info("[RADMIN]: Received Query XML Administrator Request");
|
||||||
|
|
||||||
FailIfRemoteAdminDisabled("Query XML");
|
|
||||||
|
|
||||||
XmlRpcResponse response = new XmlRpcResponse();
|
XmlRpcResponse response = new XmlRpcResponse();
|
||||||
Hashtable responseData = new Hashtable();
|
Hashtable responseData = new Hashtable();
|
||||||
|
|
||||||
|
@ -2682,8 +2654,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
{
|
{
|
||||||
m_log.Info("[RADMIN]: Received Command XML Administrator Request");
|
m_log.Info("[RADMIN]: Received Command XML Administrator Request");
|
||||||
|
|
||||||
FailIfRemoteAdminDisabled("Command XML");
|
|
||||||
|
|
||||||
XmlRpcResponse response = new XmlRpcResponse();
|
XmlRpcResponse response = new XmlRpcResponse();
|
||||||
Hashtable responseData = new Hashtable();
|
Hashtable responseData = new Hashtable();
|
||||||
|
|
||||||
|
@ -2720,8 +2690,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
{
|
{
|
||||||
m_log.Info("[RADMIN]: Received Access List Clear Request");
|
m_log.Info("[RADMIN]: Received Access List Clear Request");
|
||||||
|
|
||||||
FailIfRemoteAdminDisabled("Access List Clear");
|
|
||||||
|
|
||||||
XmlRpcResponse response = new XmlRpcResponse();
|
XmlRpcResponse response = new XmlRpcResponse();
|
||||||
Hashtable responseData = new Hashtable();
|
Hashtable responseData = new Hashtable();
|
||||||
|
|
||||||
|
@ -2779,8 +2747,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
{
|
{
|
||||||
m_log.Info("[RADMIN]: Received Access List Add Request");
|
m_log.Info("[RADMIN]: Received Access List Add Request");
|
||||||
|
|
||||||
FailIfRemoteAdminDisabled("Access List Add");
|
|
||||||
|
|
||||||
XmlRpcResponse response = new XmlRpcResponse();
|
XmlRpcResponse response = new XmlRpcResponse();
|
||||||
Hashtable responseData = new Hashtable();
|
Hashtable responseData = new Hashtable();
|
||||||
|
|
||||||
|
@ -2866,8 +2832,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
{
|
{
|
||||||
m_log.Info("[RADMIN]: Received Access List Remove Request");
|
m_log.Info("[RADMIN]: Received Access List Remove Request");
|
||||||
|
|
||||||
FailIfRemoteAdminDisabled("Access List Remove");
|
|
||||||
|
|
||||||
XmlRpcResponse response = new XmlRpcResponse();
|
XmlRpcResponse response = new XmlRpcResponse();
|
||||||
Hashtable responseData = new Hashtable();
|
Hashtable responseData = new Hashtable();
|
||||||
|
|
||||||
|
@ -2953,8 +2917,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
{
|
{
|
||||||
m_log.Info("[RADMIN]: Received Access List List Request");
|
m_log.Info("[RADMIN]: Received Access List List Request");
|
||||||
|
|
||||||
FailIfRemoteAdminDisabled("Access List List");
|
|
||||||
|
|
||||||
XmlRpcResponse response = new XmlRpcResponse();
|
XmlRpcResponse response = new XmlRpcResponse();
|
||||||
Hashtable responseData = new Hashtable();
|
Hashtable responseData = new Hashtable();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue