Skip to content

Commit

Permalink
feat(security): treat negotiation succeed if server is old version (X…
Browse files Browse the repository at this point in the history
  • Loading branch information
levy5307 committed Dec 21, 2020
1 parent b726d91 commit 79b27b1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/runtime/security/client_negotiation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,15 @@ void client_negotiation::list_mechanisms()
void client_negotiation::handle_response(error_code err, const negotiation_response &&response)
{
if (err != ERR_OK) {
fail_negotiation();
// ERR_HANDLER_NOT_FOUND means server is old version, which doesn't support authentication
if (ERR_HANDLER_NOT_FOUND == err && !FLAGS_mandatory_auth) {
ddebug_f("{}: treat negotiation succeed because server is old version, which doesn't "
"support authentication",
_name);
succ_negotiation();
} else {
fail_negotiation();
}
return;
}

Expand Down

0 comments on commit 79b27b1

Please sign in to comment.