"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/remote/httphandler.cpp" between
icinga2-2.11.5.tar.gz and icinga2-2.12.0.tar.gz

About: Icinga 2 is an enterprise grade monitoring system which keeps watch over networks and any conceivable network resource.

httphandler.cpp  (icinga2-2.11.5):httphandler.cpp  (icinga2-2.12.0)
skipping to change at line 101 skipping to change at line 101
Dictionary::Ptr params; Dictionary::Ptr params;
try { try {
params = HttpUtility::FetchRequestParameters(url, request.body()) ; params = HttpUtility::FetchRequestParameters(url, request.body()) ;
} catch (const std::exception& ex) { } catch (const std::exception& ex) {
HttpUtility::SendJsonError(response, params, 400, "Invalid reques t body: " + DiagnosticInformation(ex, false)); HttpUtility::SendJsonError(response, params, 400, "Invalid reques t body: " + DiagnosticInformation(ex, false));
return; return;
} }
bool processed = false; bool processed = false;
for (const HttpHandler::Ptr& handler : handlers) {
if (handler->HandleRequest(stream, user, request, url, response, /*
params, yc, server)) { * HandleRequest may throw a permission exception.
processed = true; * DO NOT return a specific permission error. This
break; * allows attackers to guess from words which objects
* do exist.
*/
try {
for (const HttpHandler::Ptr& handler : handlers) {
if (handler->HandleRequest(stream, user, request, url, re
sponse, params, yc, server)) {
processed = true;
break;
}
} }
} catch (const std::exception&) {
processed = false;
} }
if (!processed) { if (!processed) {
HttpUtility::SendJsonError(response, params, 404, "The requested path '" + boost::algorithm::join(path, "/") + HttpUtility::SendJsonError(response, params, 404, "The requested path '" + boost::algorithm::join(path, "/") +
"' could not be found or the request method is not valid for this path."); "' could not be found or the request method is not valid for this path.");
return; return;
} }
} }
 End of changes. 2 change blocks. 
5 lines changed or deleted 16 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)