# HG changeset patch # User Sebastien Jodogne # Date 1414413963 -3600 # Node ID e85e668d2147494b2f832b27739ca34bf7e56733 # Parent 09aa7c126be9f871e06f3f2a029eca20fe67a278# Parent 476a17cfdf42d2b41e7faddc77c253a90ca5d9b4 integration mainline->db-changes diff -r 09aa7c126be9 -r e85e668d2147 Core/HttpServer/MongooseServer.cpp --- a/Core/HttpServer/MongooseServer.cpp Fri Oct 24 11:43:47 2014 +0200 +++ b/Core/HttpServer/MongooseServer.cpp Mon Oct 27 13:46:03 2014 +0100 @@ -409,9 +409,8 @@ } - static bool Authorize(const MongooseServer& that, - const HttpHandler::Arguments& headers, - HttpOutput& output) + static bool IsAccessGranted(const MongooseServer& that, + const HttpHandler::Arguments& headers) { bool granted = false; @@ -426,15 +425,7 @@ } } - if (!granted) - { - output.SendUnauthorized(ORTHANC_REALM); - return false; - } - else - { - return true; - } + return granted; } @@ -591,8 +582,7 @@ // Authenticate this connection - if (that->IsAuthenticationEnabled() && - !Authorize(*that, headers, output)) + if (that->IsAuthenticationEnabled() && !IsAccessGranted(*that, headers)) { output.SendUnauthorized(ORTHANC_REALM); return; diff -r 09aa7c126be9 -r e85e668d2147 NEWS --- a/NEWS Fri Oct 24 11:43:47 2014 +0200 +++ b/NEWS Mon Oct 27 13:46:03 2014 +0100 @@ -7,6 +7,7 @@ * Sample plugin framework to serve static resources * Fix issue 21 (Microsoft Visual Studio precompiled headers) * Fix issue 22 (Error decoding multi-frame instances) +* Fix crash when bad HTTP credentials are provided Version 0.8.4 (2014/09/19)