summaryrefslogtreecommitdiffstats
path: root/src/Server/RequestHandlers/DaemonRequestHandlerGroup.cpp
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-08-23 20:57:00 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-08-23 20:57:00 +0200
commit415cd36477e152c12f91a10ad61bb719373cd9d1 (patch)
tree0c235f3b1f9b844313e81eb9e900fa2662ebefcc /src/Server/RequestHandlers/DaemonRequestHandlerGroup.cpp
parent6666bbf908b3f2a61a9ec1959e975de54dc23b0d (diff)
downloadmad-415cd36477e152c12f91a10ad61bb719373cd9d1.tar
mad-415cd36477e152c12f91a10ad61bb719373cd9d1.zip
Authentifikation hinzugefügt.
Diffstat (limited to 'src/Server/RequestHandlers/DaemonRequestHandlerGroup.cpp')
-rw-r--r--src/Server/RequestHandlers/DaemonRequestHandlerGroup.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Server/RequestHandlers/DaemonRequestHandlerGroup.cpp b/src/Server/RequestHandlers/DaemonRequestHandlerGroup.cpp
index 0345d7b..ee79ff2 100644
--- a/src/Server/RequestHandlers/DaemonRequestHandlerGroup.cpp
+++ b/src/Server/RequestHandlers/DaemonRequestHandlerGroup.cpp
@@ -44,10 +44,13 @@ void DaemonRequestHandlerGroup::DaemonRequestHandler::handlePacket(boost::shared
return;
}
- // TODO Require authentication
+ ConnectionManager *connectionManager = dynamic_cast<Application&>(*getApplication()).getConnectionManager();
+
+ if(!connectionManager->isAuthenticated(getConnection()))
+ throw(Core::Exception(Core::Exception::PERMISSION));
try {
- boost::shared_ptr<Common::Connection> daemonCon = dynamic_cast<Application&>(*getApplication()).getConnectionManager()->getDaemonConnection(packet->get<const std::string&>("daemon"));
+ boost::shared_ptr<Common::Connection> daemonCon = connectionManager->getDaemonConnection(packet->get<const std::string&>("daemon"));
boost::shared_ptr<Common::Request> request;
if(type == "DaemonCommand")