diff --git a/include/ircd/m/user.h b/include/ircd/m/user.h index b96dfa565..fb4b20794 100644 --- a/include/ircd/m/user.h +++ b/include/ircd/m/user.h @@ -35,7 +35,7 @@ struct ircd::m::user id::room::buf room_id() const; bool is_active() const; - bool is_password(const string_view &password) const; + bool is_password(const string_view &password) const noexcept; void password(const string_view &password); void activate(const json::members &contents = {}); diff --git a/ircd/m/user.cc b/ircd/m/user.cc index f21e2310b..6e4494bd8 100644 --- a/ircd/m/user.cc +++ b/ircd/m/user.cc @@ -118,7 +118,7 @@ catch(const m::ALREADY_MEMBER &e) bool ircd::m::user::is_password(const string_view &password) -const +const noexcept try { char buf[64]; const auto supplied @@ -146,6 +146,19 @@ const return ret; } +catch(const m::NOT_FOUND &e) +{ + return false; +} +catch(const std::exception &e) +{ + log::critical + { + "user::is_password(): %s %s", string_view{user_id}, e.what() + }; + + return false; +} bool ircd::m::user::is_active()