From b18d81ae9faf6adcf4020680bc5d874bf92848c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Tue, 25 Feb 2020 22:52:58 +0100 Subject: Fix a typo in a function name (match_pairt) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s totally harmless --- src/identd/identd_socket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/identd/identd_socket.cpp') diff --git a/src/identd/identd_socket.cpp b/src/identd/identd_socket.cpp index 92cd80b..422c5c0 100644 --- a/src/identd/identd_socket.cpp +++ b/src/identd/identd_socket.cpp @@ -47,7 +47,7 @@ std::string IdentdSocket::generate_answer(const BiboumiComponent& biboumi, uint1 { for (const auto& pair: bridge->get_irc_clients()) { - if (pair.second->match_port_pairt(local, remote)) + if (pair.second->match_port_pair(local, remote)) { std::ostringstream os; os << local << " , " << remote << " : USERID : OTHER : " << hash_jid(bridge->get_bare_jid()) << "\r\n"; -- cgit v1.2.3 From 5fbd900fd681a8d907f356ba1085899e4ec0e2c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Tue, 25 Feb 2020 23:07:26 +0100 Subject: Ignore malformed identd queries fix #3422 --- src/identd/identd_socket.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/identd/identd_socket.cpp') diff --git a/src/identd/identd_socket.cpp b/src/identd/identd_socket.cpp index 422c5c0..7688bbe 100644 --- a/src/identd/identd_socket.cpp +++ b/src/identd/identd_socket.cpp @@ -25,10 +25,12 @@ void IdentdSocket::parse_in_buffer(const std::size_t) std::istringstream line(this->in_buf.substr(0, line_end)); this->consume_in_buffer(line_end + 1); - uint16_t local_port; - uint16_t remote_port; + uint16_t local_port{}; + uint16_t remote_port{}; char sep; line >> local_port >> sep >> remote_port; + if (line.fail()) // Data did not match the expected format, ignore the line entirely + continue; const auto& xmpp = this->server.get_biboumi_component(); auto response = this->generate_answer(xmpp, local_port, remote_port); -- cgit v1.2.3