Skip to content
Snippets Groups Projects
Commit 585ffa32 authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

Merge remote-tracking branch 'origin/master' into 1.6

parents 1ac1e884 02b33a75
No related merge requests found
......@@ -61,7 +61,18 @@ authenticate(const char *user_name, uint32_t len,
"authentication request body");
}
mp_next(&tuple); /* Skip authentication mechanism. */
scramble = mp_decode_str(&tuple, &scramble_len);
if (mp_typeof(*tuple) == MP_STR) {
scramble = mp_decode_str(&tuple, &scramble_len);
} else if (mp_typeof(*tuple) == MP_BIN) {
/*
* scramble is not a character stream, so some
* codecs automatically pack it as MP_BIN
*/
scramble = mp_decode_bin(&tuple, &scramble_len);
} else {
tnt_raise(ClientError, ER_INVALID_MSGPACK,
"authentication scramble");
}
if (scramble_len != SCRAMBLE_SIZE) {
/* Authentication mechanism, data. */
tnt_raise(ClientError, ER_INVALID_MSGPACK,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment