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

feat(security): treat negotiation succeed if server is old version #694

Merged
merged 5 commits into from
Dec 17, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 authentiation
if (ERR_HANDLER_NOT_FOUND == err && !FLAGS_mandatory_auth) {
ddebug_f("{}: treat negotiation succeed because server is old version, which doesn't "
"support authentiation",
_name);
levy5307 marked this conversation as resolved.
Show resolved Hide resolved
succ_negotiation();
} else {
fail_negotiation();
}
return;
}

Expand Down