fix stupid logic error

This commit is contained in:
Kai Jan Kriegel 2022-03-12 00:51:42 +01:00
parent 4611ed5b48
commit 37db05a557

View File

@ -133,7 +133,7 @@ impl authentication_system::Server for Auth {
// Extract the MECHANISM the client wants to use and start a session.
// Or fail at that and thrown an exception TODO: return Outcome
let mech = pry!(req.get_mechanism());
if mech != "PLAIN" || mech != "X-FABFIRE" {
if !((mech == "PLAIN") || (mech == "X-FABFIRE")) {
return Promise::err(capnp::Error {
kind: capnp::ErrorKind::Failed,
description: format!("Invalid SASL mech"),