Don’t allow WebSocket RPC authenticate method to be called with no token value

This commit is contained in:
Tobie Morgan Hitchcock 2022-10-25 06:24:47 -07:00
parent d2e7a8532d
commit 926356d23b

View file

@ -208,7 +208,6 @@ impl Rpc {
_ => return res::failure(id, Failure::INVALID_PARAMS).send(out, chn).await,
},
"authenticate" => match params.take_one() {
Value::None => rpc.write().await.invalidate().await,
Value::Strand(v) => rpc.write().await.authenticate(v).await,
// Authenticate using an authentication token
_ => return res::failure(id, Failure::INVALID_PARAMS).send(out, chn).await,