Skip to content

Commit

Permalink
tolerate empty Authorization header (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
traines-source authored Jan 19, 2025
1 parent 30f8b05 commit f5a6978
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/web_server/query_router.cc
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void query_router<Executor>::decode_content(request& req) {
template <typename Executor>
void query_router<Executor>::set_credentials(route_request& req) {
if (auto const it = req.base().find(boost::beast::http::field::authorization);
it != req.base().end()) {
it != req.base().end() && it->value().length() > 6) {
auto const auth = it->value().substr(6);
auto const credentials =
decode_base64(std::string{auth.data(), auth.size()});
Expand Down

0 comments on commit f5a6978

Please sign in to comment.