From 415cd36477e152c12f91a10ad61bb719373cd9d1 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 23 Aug 2009 20:57:00 +0200 Subject: =?UTF-8?q?Authentifikation=20hinzugef=C3=BCgt.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Server/RequestHandlers/DaemonRequestHandlerGroup.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/Server/RequestHandlers/DaemonRequestHandlerGroup.cpp') 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(*getApplication()).getConnectionManager(); + + if(!connectionManager->isAuthenticated(getConnection())) + throw(Core::Exception(Core::Exception::PERMISSION)); try { - boost::shared_ptr daemonCon = dynamic_cast(*getApplication()).getConnectionManager()->getDaemonConnection(packet->get("daemon")); + boost::shared_ptr daemonCon = connectionManager->getDaemonConnection(packet->get("daemon")); boost::shared_ptr request; if(type == "DaemonCommand") -- cgit v1.2.3