Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Commit

Permalink
feat(security): treat negotiation succeed if server is old version (#694
Browse files Browse the repository at this point in the history
)
  • Loading branch information
levy5307 authored Dec 17, 2020
1 parent d4f45be commit 67e06d2
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 67e06d2

Please sign in to comment.