diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-08-23 20:57:00 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-08-23 20:57:00 +0200 |
commit | 415cd36477e152c12f91a10ad61bb719373cd9d1 (patch) | |
tree | 0c235f3b1f9b844313e81eb9e900fa2662ebefcc /src/Server/RequestHandlers/DaemonRequestHandlerGroup.cpp | |
parent | 6666bbf908b3f2a61a9ec1959e975de54dc23b0d (diff) | |
download | mad-415cd36477e152c12f91a10ad61bb719373cd9d1.tar mad-415cd36477e152c12f91a10ad61bb719373cd9d1.zip |
Authentifikation hinzugefügt.
Diffstat (limited to 'src/Server/RequestHandlers/DaemonRequestHandlerGroup.cpp')
-rw-r--r-- | src/Server/RequestHandlers/DaemonRequestHandlerGroup.cpp | 7 |
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") |