From 623202d68e862b346b22ac65f9dcbb498d2fa2ac Mon Sep 17 00:00:00 2001 From: Shauren Date: Tue, 26 Dec 2023 14:55:15 +0100 Subject: Core/Bnet: Implemented new SRP6 variants, and migrate old sha_pass_hash in battlenet_accounts to separate salt and verifier columns * passwords can now be case sensitive and up to 128 characters long --- src/server/shared/Networking/Http/HttpService.cpp | 10 ++++++++-- src/server/shared/Networking/Http/HttpService.h | 6 +++--- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'src/server/shared') diff --git a/src/server/shared/Networking/Http/HttpService.cpp b/src/server/shared/Networking/Http/HttpService.cpp index 3e80d08959c..8bb533d73c0 100644 --- a/src/server/shared/Networking/Http/HttpService.cpp +++ b/src/server/shared/Networking/Http/HttpService.cpp @@ -81,9 +81,9 @@ RequestHandlerResult DispatcherService::HandleRequest(std::shared_ptrFunc(std::move(session), context); } -RequestHandlerResult DispatcherService::HandlePathNotFound(std::shared_ptr /*session*/, RequestContext& context) +RequestHandlerResult DispatcherService::HandleBadRequest(std::shared_ptr /*session*/, RequestContext& context) { - context.response.result(boost::beast::http::status::not_found); + context.response.result(boost::beast::http::status::bad_request); return RequestHandlerResult::Handled; } @@ -93,6 +93,12 @@ RequestHandlerResult DispatcherService::HandleUnauthorized(std::shared_ptr /*session*/, RequestContext& context) +{ + context.response.result(boost::beast::http::status::not_found); + return RequestHandlerResult::Handled; +} + void DispatcherService::RegisterHandler(boost::beast::http::verb method, std::string_view path, std::function session, RequestContext& context)> handler, RequestHandlerFlag flags) diff --git a/src/server/shared/Networking/Http/HttpService.h b/src/server/shared/Networking/Http/HttpService.h index 01c66146ae3..e68f8d2795f 100644 --- a/src/server/shared/Networking/Http/HttpService.h +++ b/src/server/shared/Networking/Http/HttpService.h @@ -61,8 +61,9 @@ public: RequestHandlerResult HandleRequest(std::shared_ptr session, RequestContext& context); - RequestHandlerResult HandlePathNotFound(std::shared_ptr session, RequestContext& context); - RequestHandlerResult HandleUnauthorized(std::shared_ptr session, RequestContext& context); + static RequestHandlerResult HandleBadRequest(std::shared_ptr session, RequestContext& context); + static RequestHandlerResult HandleUnauthorized(std::shared_ptr session, RequestContext& context); + static RequestHandlerResult HandlePathNotFound(std::shared_ptr session, RequestContext& context); protected: void RegisterHandler(boost::beast::http::verb method, std::string_view path, @@ -179,7 +180,6 @@ protected: return threads; } -private: Asio::IoContext* _ioContext; std::string _logger; }; -- cgit v1.2.3